Re: [CSS21][Core grammar] Significant whitespace

On 2/23/12 2:18 PM, Simon Sapin wrote:
> Another example: this is valid "background: url(foo) repeat #fff" but is
> this? "background: url(foo)repeat#fff"

The latter is valid as far as I can tell (and supported by Gecko, 
WebKit, Presto at least; I don't have Trident to hand this second).

> Last one: "!important" is 2 tokens: DELIM then IDENT.

It's a single token, as far as I can tell.  In CSS 2.1, at least, not 
necessarily per the core grammar...

> "! important" would be 3: DELIM, S then IDENT.

No, it's also a single token as far as I can tell.  Again, in CSS 2.1.

> I think only the former  is valid in CSS 2.1 for priority

"! important" is valid.  It's even used in the spec examples.

The relevant part of the CSS2.1 tokenizer is:

"!"({w}|{comment})*{I}{M}{P}{O}{R}{T}{A}{N}{T} {return IMPORTANT_SYM;}

-Boris

Received on Thursday, 23 February 2012 19:35:31 UTC