W3C home > Mailing lists > Public > www-style@w3.org > April 2013

[css-conditional] !important in @support (was: [css-fonts] grammar changes for @font-face and @font-feature-values rules)

From: Simon Sapin <simon.sapin@exyr.org>
Date: Tue, 30 Apr 2013 09:46:53 +0200
Message-ID: <517F76ED.6070304@exyr.org>
To: www-style@w3.org
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:

   : 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) {
>   // ...
> }

Simon Sapin
Received on Tuesday, 30 April 2013 07:47:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:29 UTC