Re: [css-shapes] basic shape syntax in prose

On 9/27/13 1:19 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>On Fri, Sep 27, 2013 at 1:06 PM, Alan Stearns <stearns@adobe.com> wrote:
>> The normative grammar-based definition is not readable when precise, and
>> not precise when readable. I think there's a false sense of accuracy in
>> the format for functional notation, as we seem to be willing to fudge
>> whitespace rules everywhere.
>
>What do you mean?

This definition doesn't precisely define what's actually allowed in hsl():

hsl() = hsl( <hue>, <percentage>, <percentage> )

It's actually something more like:

hsl() = hsl([ ]*<hue>[ ]*,[ ]*<percentage>[ ]*,[ ]*<percentage>[ ]*)

I definitely prefer the former, but when Bear was writing parsing tests he
had an entirely valid question whether the whitespace expressed in the
basic shapes syntax was an override to the prose definition of functional
notation [1], or if he should ignore that part of the basic shape grammar.


>>
>> As there are too few people who have any idea what {3,5} means here,
>
>It's standard regex-inspired syntax, familiar to anyone who has a comp
>sci background.

-inspired is the key. CSSWG additions and conventions are what trip people
up.

Thanks,

Alan

[1] http://www.w3.org/TR/css3-values/#functional-notation

Received on Friday, 27 September 2013 20:54:53 UTC