Re: [css-variables] whether implied tokens due to EOF are included in variable value

There's no such thing as "implied tokens", though it may make it
easier for you to think about it as if there are.  Some constructs can
simply be closed either by an ending token or by an EOF (or newline,
in some circumstances).

On Mon, May 20, 2013 at 1:36 AM, Cameron McCormack <> wrote:
> Say you have this:
>   <style>#a { var-x: ( url(</style>
> Is this variable declaration valid or is it dropped?

Valid.  The produces the following token stream:


In particular, note the url-unquoted state in Syntax, where an EOF is
listed alongside ) as a character that just closes the url token

>  If it is valid, is the
> computed value of this property
>   1. "( url("
>   2. "( url(" or
>   3. "( url("
> ?  I think the answers should be "valid" and "1", but I don't think it is
> clear from the spec.

Ooh, good question.  I think Syntax mandates #1, because parsing will
produce a ()-block containing whitespace and a url token.  The fact
that the () block was closed by an EOF rather than a ) token is lost.

I probably do need to define in Syntax how to serialize component values.

#3 is right out.


Received on Monday, 20 May 2013 22:41:29 UTC