- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 20 May 2013 15:40:39 -0700
- 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: HASH(a) WS { WS IDENT(var-x) COLON WS ( WS URL(http://example.org/) In particular, note the url-unquoted state in Syntax, where an EOF is listed alongside ) as a character that just closes the url token validly. > 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. ~TJ
Received on Monday, 20 May 2013 22:41:29 UTC