[csswg-drafts] [css-conditional-3] Are there issues with !important in @supports? (Is the grammar wrong?) (#5559)

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

== [css-conditional-3] Are there issues with !important in @supports?  (Is the grammar wrong?) ==
@SimonSapin [wrote on www-style in 2013](

>Le 30/04/2013 07:44, John Daggett a écrit :
>> I've updated the CSS3 Fonts draft based on Simon's feedback.
>>
>>> AFAICT, the point of <descriptor_declaration> is to not have the <prio>
>>> production for !important. You could, like @supports, refer to
>>> <declaration> defined in the Core Grammar instead.
>> Does @supports specifically ban the <prio> production?  I don't see
>> the language in there for that.  It's a relatively minor point but I
>> added the production to be clear that '!important' has no function in
>> @font-face rules (there have been issues brought up in the past in
>> relation to this).

> I just assumed that because @supports defines <declaration> explicitly 
> by referring to Chapter 4:
>
>   declaration : property S* ':' S* value;
>
> rather than Appendix G:
>
> declaration
>   : property ':' S* expr prio?
>    ;


> But I was wrong. !important is allowed and has no effect. This is 
> specified in section 6, just before section 6.1:

>> A trailing ‘!important’ on a declaration being tested is allowed,
>> though it won't change the validity of the declaration.
>>
>> For example, the following rule is valid:
>>
>> @supports (display: flexbox !important) {
>>   // ...
>> }

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 29 September 2020 14:53:03 UTC