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

rulesets without selector

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 2 Dec 2000 19:43:30 +0100
Message-ID: <00c101c05c96$f9ede0a0$c7e0a8c0@de>
To: <www-style@w3.org>
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.
--
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981ASK ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote [!]e
  "Everything we see or seem is but a dream within a dream" - E.A. Poe
Received on Saturday, 2 December 2000 14:34:06 GMT

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