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

Re: [CSS21] URL tokenization in invalid declarations

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 09 Sep 2010 18:16:53 -0700
Message-ID: <4C898705.4010808@inkedblade.net>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
CC: "www-style@w3.org" <www-style@w3.org>
On 09/09/2010 05:13 PM, Bjoern Hoehrmann wrote:
> * 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.

So does that mean this testcase is correct?

Received on Friday, 10 September 2010 01:17:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC