[csswg-drafts] [cssom] Should font descriptors and such appear as properties in CSSStyleDeclaration? (#3647)

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom] Should font descriptors and such appear as properties in CSSStyleDeclaration? ==
See https://github.com/w3c/csswg-drafts/issues/3588#issuecomment-460019494.

Right now, per spec, they shouldn't:

https://drafts.csswg.org/cssom-1/#cssstyledeclaration says:

> For each CSS property property that is a supported CSS property, the following partial interface applies where camel-cased attribute is obtained by running the CSS property to IDL attribute algorithm for property.

https://drafts.csswg.org/cssom-1/#supported-css-property doesn't say anything about descriptors. And indeed Blink at least returns true for `'unicodeRange' in document.documentElement.style`, which is really weird.

But Blink and WebKit implement this. It feels a bit weird that `'unicodeRange' in document.body.style` would return true... But on the other hand it is weird that `'color' in fontFaceRule.style` would return true as well. So maybe we should expand the concept of "Supported CSS properties" to "Supported CSS properties and descriptors", or something.

Opinions?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3647 using your GitHub account

Received on Tuesday, 12 February 2019 11:16:25 UTC