confluence icon indicating copy to clipboard operation
confluence copied to clipboard

Aliased webkit-prefixed CSS properties are missing

Open RByers opened this issue 8 years ago • 1 comments

In Chrome, CSS properties which are aliases (alias_for in CSSProperties.json5) of other properties don't show up when enumerating the properties of a CSSStyleDeclaration instances, but they're actually still there:

> 'webkitUserSelect' in document.body.style
true
> Object.getOwnPropertyNames(document.body.style).indexOf('webkitUserSelect')
-1

This makes some CSS properties appear to be Safari-specific when they're really not. I was thinking we should just fix this as a Chrome bug, but I see Safari has some like this as well - eg. webkitFlex.

Perhaps we should just have a hack for CSSStyleDeclaration to explicitly look for 'webkitFoo' in document.body.style for each Foo in document.body.style?

RByers avatar Sep 26 '17 14:09 RByers

I filed a chromium bug to discuss what should be done there, but I think that's probably orthogonal (best case, it'll be awhile before Chrome and Safari ship with these exposed, and there's enough properties impacted that I think hacking around it makes sense).

RByers avatar Sep 26 '17 18:09 RByers