-
Notifications
You must be signed in to change notification settings - Fork 711
[css3-conditional] Should CSS.supports() accept properties which are only valid in certain rules? #5929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I personally believe the answer should be no, because it's possible to have a property and an at-rule descriptor of the same name, and that would be ambiguous here. |
What @tabatkins says applies to the current syntax of property checks, though what about introducing a new syntax that includes the at-rule in the condition? I.e. something like this for example: @supports (@page { size: 10cm; }) {
...
} That would work like the existing parsing checks for properties and selectors, so no new logic here. It only requires to extend the syntax of Sebastian |
This is related to #2463, but discussion there is focused on a |
…ules; not discussing at-rule descriptors here. #5929
As @tabatkins explained, there are cases where a property and descriptor have the same name, but these are nonetheless separate features: this is most evident for |
Note that this test only checks that |
The exact case I'm looking at is
page-size
( https://drafts.csswg.org/css-page-3/#page-size-prop ), which I'm currently implementing in Firefox, and which is only specified to be valid in@page
rules.It appears that
size
is also valid in style declarations in WebKit in Chrome with the same syntax, which is hit in some web-platform tests, for instance https://github.com/web-platform-tests/wpt/blob/master/css/css-conditional/js/CSS-supports-CSSStyleDeclaration.htmlIf a property like
size
is supported only in a specific at-rule, should it accepted by CSS.supports?The text was updated successfully, but these errors were encountered: