W3C home > Mailing lists > Public > www-style@w3.org > April 2009

status of css3-syntax

From: Yves Lafon <ylafon@w3.org>
Date: Fri, 3 Apr 2009 08:17:20 -0400 (EDT)
To: www-style@w3.org
Message-ID: <Pine.LNX.4.64.0904030806190.3405@ubzre.j3.bet>
After finding an example in css3-background that looks quite strange
<<
the (10em) in [1]:  p { background: url("chess.png") (10em) gray
                     40% round fixed border border}
>>
I checked the CSS3 syntax to see if it was a valid construct, and found 
the following issues:

In CSS3 Syntax [2], ident is defined like this
  ident	        [-]?{nmstart}{nmchar}*
  nmstart        [a-z]|{nonascii}|{escape}
  nmchar         [a-z0-9-]|{nonascii}|{escape}

While in CSS21 [3], is is defined as follow:
  ident	        -?{nmstart}{nmchar}*
  nmstart        [_a-z]|{nonascii}|{escape}
  nmchar         [_a-z0-9-]|{nonascii}|{escape}

The "_" is allowed in CSS21 and not in CSS3. Is that intentional?

Also the definition of IMPORT_SYM, PAGE_SYM etc... are not in sync
IMPORTANT_SYM allows a comment between ! and "important" in CSS21 and not 
in CSS3.

So what is the right syntax, the one in CSS21, augmented by the various 
CSS3 specs (like namespaces, that renders the grammar LR(2) instead of 
LR(0)), will CSS3-syntax be modified soon?

(my goal was to generate a crude parser to verify the examples and 
syntax definition of all the others CSS3-* specs)
Cheers,

[1] http://www.w3.org/TR/css3-background/#the-background
[2] http://www.w3.org/TR/css3-syntax/#lexical
[3] http://www.w3.org/TR/CSS21/grammar.html#scanner

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves
Received on Friday, 3 April 2009 12:17:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:46:58 GMT