W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [CSS21][Core grammar] Significant whitespace

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 23 Feb 2012 14:35:02 -0500
Message-ID: <4F4694E6.10800@mit.edu>
To: www-style@w3.org
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;}

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

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