W3C home > Mailing lists > Public > www-style@w3.org > May 2013

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 20 May 2013 15:40:39 -0700
Message-ID: <CAAWBYDArL6FRyF5X-kSRkTB4sDH3VO9QFVD4JEeEvHCnkZxVFQ@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: www-style list <www-style@w3.org>
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 <cam@mcc.id.au> wrote:
> Say you have this:
>   <style>#a { var-x: ( url(http://example.org/</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(http://example.org/))"
>   2. "( url(http://example.org/)" or
>   3. "( url(http://example.org/"
> ?  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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:30 UTC