Re: [CSS21] URL tokenization in invalid declarations

* fantasai wrote:
>I was working on the uri-16.xht test when I started wondering
>if I'd gotten it right.
>
>Because comment delimiters are not recognized in url() tokens,
>the following will result in a green background:
>
>   background: url(/*) green;

The process here is that you start at the beginning of a string and then
check if whatever it starts with is an IDENT or a STRING or a URI or ...
and from the possibilities you find you pick the longest match and then
start over to find the next token. If the string is "url(/*)" then you
have the possibilities

  * IDENT ("url")
  * FUNCTION ("url(")
  * URI ("url(/*)")

Since matching URI consumes the most characters, you pick that and then
start over after the URI token. So this is not a special case, it's the
same as if you'd had url(example.png). I believe that answers all three
questions.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Friday, 10 September 2010 00:13:43 UTC