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

Inconsistencies across CSS3 specs

From: Nicholas Zakas <nzakas@yahoo-inc.com>
Date: Tue, 7 Dec 2010 10:24:01 -0800
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <B66541E954ECF146AD8CA69D34A283FF26A57E659C@SP2-EX07VS02.ds.corp.yahoo.com>
Hello all,

I originally wrote a CSS 2.1 parser in JavaScript and have been going about trying to update to CSS3. The problem I'm having is that, whereas CSS 2.1's grammar was wholly contained in http://www.w3.org/TR/CSS2/grammar.html, there is no such canonical source for a CSS3 grammar. In fact, quite confusingly, the grammar is spread out amongst multiple specs. Thusfar, I've noticed the following problems:

1. Inconsistent naming of tokens across specifications. Some examples:

  In the CSS3 Grammar spec:
    {num}{ident}               {return DIMEN;}

  In the CSS3 Selectors spec:
    {num}{ident}     return DIMENSION;
  In the CSS3 Media Queries spec:
    {N}{O}{T}         {return NOT;}

  In the CSS3 Selectors spec:
    ":"{N}{O}{T}"("  return NOT;

2. Not every spec has a section for its associated grammar.

3. When specs do have grammars, they're in inconsistent places. The CSS3 Grammar spec has its listing under "Grammar" while CSS3 Media Queries have it listed under "Syntax". Other specs have sections called "Syntax" that simply show example code.

All of these inconsistencies make it incredibly difficult to implement a CSS3 parser from scratch. Is there any plan to rationalize these specs against each other? Further, any plan to move the specs into a more consistent format such that the module definitions, syntax, and grammar are all available in predictable order?



Commander Lock: "Dammit Morpheus, not everyone believes what you believe!"
Morpheus: "My beliefs do not require them to."
Received on Tuesday, 7 December 2010 18:25:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:41 UTC