- From: Simon Sapin <simon.sapin@kozea.fr>
- Date: Fri, 14 Dec 2012 15:21:35 +0100
- To: www-style list <www-style@w3.org>
Hi, We currently have two definitions for the syntax of !important (not counting CSS 2.1 which is superseded by corresponding level 3 modules.) css3-syntax, section 3.5.9: Declaration-important mode (reached after ! in a declaration value) > whitespace token > comment token > Do nothing. Remain in this mode. > ident token with a value of "important" > If the current declaration is one that can be made important, > set the important flag of the current declaration to true, > and switch to the declaration-end mode. css3-cascade, section 4.2.2: > A declaration is "!important" if the last two tokens in its value are > the delimiter token ‘!’ followed by the identifier token > ‘important’. As you can see, the former definition allows whitespace and comments between ! and important, while the latter does not. I don’t care what the exact syntax is, but it should be defined no less and no more than once. I suggest that either: 1. css3-cascade refers to css3-syntax for this. 2. css3-syntax removes anything related to !important, which is becomes part of the declaration’s "value". css3-cascade defines exactly how !important is separated from the rest of the value. I prefer 1 as syntax belongs in the Syntax module, but 2 would work too. -- Simon Sapin
Received on Friday, 14 December 2012 14:22:04 UTC