Re: [csswg-drafts] [css-conditional] assigning to conditionText and calling CSS.supports()

> Is this matching done strictly according to the grammar, or should the
normal CSS parsing rules be applied? For example with:
>
> `supportsRule.conditionText = "(color: green";`

There is no sense in which match "according to the grammar" is *not* done according to normal CSS parsing rules. The grammar isn't defined over strings, it's defined over component values, which are produced by parsing. So yes, by definition that's a valid assignment, completely indistinguishable from assigning `"(color: green)"`.

(This can be made clearer by explicitly invoking [`[=CSS/parse=]`](https://drafts.csswg.org/css-syntax/#css-parse-something-according-to-a-css-grammar).)

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3173#issuecomment-425558677 using your GitHub account

Received on Friday, 28 September 2018 20:36:59 UTC