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

Re: [css3-values][css-variables] definition of <value>

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 9 Jul 2012 10:35:27 -0700
Message-ID: <CAAWBYDB0vUn0v0-1oQxS0iJ+dWahzvAaDG9ZaYoX8z2SMiY38A@mail.gmail.com>
To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
Cc: WWW Style <www-style@w3.org>
On Mon, Jul 9, 2012 at 8:08 AM, Kang-Hao (Kenny) Lu
<kennyluck@csail.mit.edu> wrote:
> (12/07/09 22:53), Tab Atkins Jr. wrote:
>> On Fri, Jul 6, 2012 at 4:56 AM, Kang-Hao (Kenny) Lu
>> <kennyluck@csail.mit.edu> wrote:
>>> (12/04/24 4:01), Tab Atkins Jr. wrote:
>>>> Below are the resolutions of the issues you raised in this thread.
>>>> Issue 12: cycle() and values that have commas
>>>> Closed as OutOfScope pending WG resolution - we're proposing to punt
>>>> cycle() to the next level so we can address these and other issues
>>>> with cycle() more properly.
>>> Sorry about not spotting this earlier, but isn't toggle() back with the
>>> same issue:
>>> (12/04/06 9:44), Kang-Hao (Kenny) Lu wrote:
>>>> 1. can <value> contain ',' ? If yes, how is syntax ambiguity resolved
>>>> within a cycle() ?
>>> with s/cycle/toggle/
>>> The description of toggle() has a note saying
>>>   # Note that because toggled values are separated by commas, they
>>>   # cannot themselves include top-level commas.
>>> Why can't we make this normative? Otherwise, you can just add a
>>> normative statement for UA saying toggle()'s content is parsed by
>>> splitting at commas.
>> It's not normative because the definition falls out of the grammar if
>> you avoid ambiguity.
> I am sorry but I am not getting this sentence...
> Am I right that this issue isn't addressed? Or at least it shouldn't be
> OutOfScope just because the name of the functional notation changes.
> If you think this is an unimportant issue or you would rather defer that
> to level level, I think you should record this as a Rejected or Deferred
> instead.

Apologies, the LC issues list is out-of-date.  For a response it
should point to the minutes of the Hamburg meeting where this was
re-discussed and we decided not to punt cycle() (and rename it to

However, it was changed to Rejected status after the Hamburg meeting.

>> The note is just there as a reminder to authors.
> I always assume a spec would have the same normative meaning with all
> the notes removed. Am I just missing a normative statement somewhere?

You aren't missing anything, there just isn't an ambiguity for
browsers.  Functions always split their arguments on commas.
"toggle(blue, white)" is two arguments, not a single "blue, white"
argument.  The only exception is when we define that a trailing
argument can contain commas itself (such as in attr()), and then we
craft the syntax very carefully to prevent it from being ambiguous
(usually, by freezing the number of comma-separated arguments).

The only problem is confusion for authors, because if they try to
toggle a comma-separated value, they'll instead accidentally be
toggling multiple non-separated values.  Thus, the note was added to
make it clearer to authors what the behavior will be in that
circumstance, to remove any possibility of them thinking that the
browser will try to be "smart" and figure out their intention.

Received on Monday, 9 July 2012 17:36:14 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:01 UTC