W3C home > Mailing lists > Public > www-style@w3.org > December 2000

Re: rulesets without selector

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 2 Dec 2000 12:06:19 -0800 (Pacific Standard Time)
To: Bjoern Hoehrmann <derhoermi@gmx.net>
cc: www-style@w3.org
Message-ID: <Pine.WNT.4.21.0012021204580.976-100000@HIXIE.netscape.com>
On Sat, 2 Dec 2000, Bjoern Hoehrmann wrote:
>
> Hi,
> 
> CSS Level 2 defines:
> 
>   ruleset : selector? '{'
>               S* declaration? [ ';' S* declaration? ]*
>             '}' S*;
> 
> Why is a selector optional? A stylesheet like
> 
>     { color: red }
> 
> does not make any sense to me.
> 
> selector is by the way defined as any+ where any can be a whitespace, so even
> if a selector is required, the above stylesheet conforms to the core syntax.

It is an error. The editor of the CSS3 Selectors spec (Daniel Glazman) is
aware of it and it should be fixed in CSS3.

One could argue this should be made an errata item in CSS2... Or maybe the
grammar should be made non-normative?

The textual description is correct.

-- 
Ian Hickson                                     )\     _. - ._.)       fL
Netscape, Standards Compliance QA              /. `- '  (  `--'
+1 650 937 6593                                `- , ) -  > ) \
irc.mozilla.org:Hixie _________________________  (.' \) (.' -' __________
Received on Saturday, 2 December 2000 15:02:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:06 GMT