Re: [css-variables] Slight tweak to value space of CSS variables

On Tuesday 2013-02-05 20:00 -0700, L. David Baron wrote:
> Currently the value space of CSS variables is the "value" production
> in the CSS 2.1 grammar, as specified here:
> and defined here:
> One detail that bothers me is that this production allows the CDO
> and CDC tokens *inside* of (), [], or {}, but does not allow them at
> the top level of the value.
> I think we should change this, and change the value space of
> variables from:
>   value
> to
>   [ value | CDO S* | CDC S* ]+

In a discussion with Simon Sapin, I realized my analysis above was
slightly wrong.  There's one other case that's not permitted but
that I believe should be permitted -- though I believe it's probably
a bug in the CSS 2.1 general grammar.

In particular, this production:
  block       : '{' S* [ any | block | ATKEYWORD S* | ';' S* ]* '}' S*;
in does not
allow CDO and CDC to be directly inside of a {} pair (like they can
be inside of a () or [] pair, as part of the unused production).

I think variables should, for simplicity of parsing, allow CDO and
CDC directly inside any {} pair.  And in general I still believe in
my general description of what should be allowed that I gave in 
(as modified by the correction to the spec that resulted from the
message quoted above, i.e., ).


𝄞   L. David Baron                  𝄂
𝄢   Mozilla                    𝄂

Received on Wednesday, 22 May 2013 05:07:26 UTC