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

Re: [css-variables] allowed syntax of variable values

From: L. David Baron <dbaron@dbaron.org>
Date: Tue, 29 May 2012 15:20:24 -0700
To: John Daggett <jdaggett@mozilla.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style@w3.org
Message-ID: <20120529222024.GA30594@crum.dbaron.org>
On Tuesday 2012-05-29 13:49 -0700, John Daggett wrote:
> Tab Atkins Jr. wrote:
> 
> > > As David has already pointed out, that section of the Core Grammar
> > > is informative, not normative. You seem to be shaping the spec to
> > > what's convenient to implement for your user agent.
> > 
> > Careful where you point those accusations, John.  If I were being
> > convenient to our implementation, I'd have stuck to the "term"
> > production in Appendix G, which is what our experimental
> > implementation actually uses.
> 
> Fine.  You seem to be taking an approach based on a formal grammar
> when CSS parsing rules are based on a combination of formal syntax and
> parsing rules described in text.  Using a formal grammar will be a
> natural fit for some implementations, for others it won't.  I don't
> see that the <value> type is something that is intuitively clear to
> authors nor do I think it's a great idea to be doing validation in two
> places, once in the definition and again in the use.

My understanding is that Tab's intent is that <value> refers to the
value production in
http://www.w3.org/TR/CSS21/syndata.html#tokenization , which I think
is the right thing here.  It basically accepts any token stream that
has balanced quotes, parentheses, brackets, and braces, and doesn't
contain a semicolon, <!--, or --> at top level (i.e., not quoted,
parethesized, etc.).  (I'm not sure we want the <!-- and -->
restrictions, though.)

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Tuesday, 29 May 2012 22:20:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:54 GMT