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

parsing issue in the editor's draft of css3-image

From: Yves Lafon <ylafon@w3.org>
Date: Thu, 16 Jul 2009 08:55:42 -0400 (EDT)
To: www-style@w3.org
Message-ID: <alpine.DEB.1.10.0907151203150.6565@wnl.j3.bet>
In [1], I found the following example:

background-image: image(wavy.svg, 'wavy.png' 150dpi, "wavy.gif"  or blue);

Should it be image( url(wavy.svg), 'wavy.png' 150dpi, "wavy.gif" or blue); ?

With the CSS21 current parsing rules, function is defined as

  FUNCTION S* expr ')' S*

expr
   : term [ operator? term ]*

term
   : unary_operator?
     [ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* | ANGLE S* |
       TIME S* | FREQ S* ]
   | STRING S* | IDENT S* | URI S* | hexcolor | function
   ;

So the unquoted wavy.svg is not a string, not a URI (as url(...) is 
missing) and not an ident because of the '.' and a CSS21 Parser based on 
the latest CSS21 Candidate Rec is unable to parse this declaration.

Depending of the intent, it would be good to either add a url() or to 
require quotes.
Thanks,

[1] http://dev.w3.org/csswg/css3-images/

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

         ~~Yves
Received on Thursday, 16 July 2009 12:55:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:19 GMT