W3C home > Mailing lists > Public > www-style@w3.org > February 2010

Re: [css3-background] grammar issue

From: Yves Lafon <ylafon@w3.org>
Date: Fri, 26 Feb 2010 10:23:51 -0500 (EST)
To: Brad Kemper <brad.kemper@gmail.com>
cc: "Tab Atkins Jr." <jackalmage@gmail.com>, fantasai <fantasai.lists@inkedblade.net>, Bert Bos <bert@w3.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <alpine.DEB.1.10.1002261018060.28336@wnl.j3.bet>
On Fri, 26 Feb 2010, Brad Kemper wrote:

>
>
> On Feb 26, 2010, at 10:21 PM, Yves Lafon <ylafon@w3.org> wrote:
>
>> On Fri, 26 Feb 2010, Brad Kemper wrote:
>> 
>>> 
>>> On Feb 26, 2010, at 4:43 AM, Yves Lafon wrote:
>>> 
>>>>> I disagree. In border-image you can have nothingness between the two 
>>>>> slashes.
>>>> What?? If that's true (and the grammar seems to allow that, 
>>>> unfortunately), then it's really insane, unless 'nothing' is an allowed 
>>>> value, but I bet it is not.
>>> 
>>> Why would 'nothing' have to be an allowed value? Leaving out a value out 
>>> from a shorthand does not set it to 'nothing', and it does not change the 
>>> syntactical rules of the shorthand.
>> 
>> Yes it does, separators must separate things.
>> border-image: // 10px
>> (or border-image: / / 10px) is also a bad unless it means
>> border-image: <nothing> / <nothing> / 10px
>> 
>> As <nothing> is not an allowed value,
>
> You didn't say <nothing> would have to be ab allowed value, you said 
> 'nothing' had to be an allowed value. If <nothing> is defined as an empty 
> string or null, then sure it is allowed, as many times as you want, in any 
> property you want. Put a million of them between each letter if you want,

No it's not, otherwise parsing would be extremely difficult.

> since the end result is the same as if you hadn't. I think it is ridiculous 
> to say that a shorthand property needs to explicitly allow for the non-typing 
> of nonexistant text.
>
>> something else than '/' ou ',' (defined as separators) should be used, 
>> unless you add specific rules like "don't start with a / and don't put two 
>> / in a row", or even add an 'ignored' value.
>
> That doesn't make any sense. Add an emprty string or not, the result is the 
> same. You don't ever need grammar to say that what isn't there should be 
> ignored. And I see absolutely no reason to unnecessarily restrict authors 
> with rules like "don't start with a / and don't put two / in a row".
>
> The slashes are easy to distinguish as separators, whether separating two 
> possibly confused values in the background shorthand, or groups of values 
> more restrictively in border-image. Once you learn what is allowed or not on 
> the two sides of each slash (a very simple thing to learn and remember), then 
> it helps make the otherwise complex shorthand easy to read.

A separator is not separating meanings, it separates syntactic entities.
If '/' was not already used as a separator, it would not be an issue.

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves
Received on Friday, 26 February 2010 15:23:53 GMT

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