Re: [css-shapes] Optional radius arguments for ellipse shapes

On 12/2/13, 11:55 AM, "Bem Jones-Bey" <bjonesbe@adobe.com> wrote:

>Hi Alan, et al.
>
>Rob (cc'd) and I were talking about parsing of ellipse shapes[1], and we
>noticed that the grammer seems to say that both <shape-radius> arguments
>or none must be supplied, when the spec makes it sound like it would be
>valid for just one <shape-radius> to be supplied, causing the second to
>default to closest-side[2]. I believe that the grammar is what is
>incorrect in this case, but can you clarify?

I went back and forth on this issue, but for this draft decided to match
the radial gradient syntax [1] which either allows you to omit both radii
or requires you to supply both. The part of the spec that mentions the
defaults only comes up if both radii are omitted. I was thinking that
consistency was more important than defining a shortcut for what I assume
will be a seldom-used case where an ellipse has a definite x-radius and a
y-radius of closest-side.

That said, I just noticed that radial gradients do not allow two keywords
for ellipse radii, while shapes currently does. I expect this is to cover
the *-corner keywords that would not make sense as a single ellipse
radius. So we could consider diverging further if you think this case is
important enough. I’m leaning towards keeping the draft as it is.

Thanks,

Alan

[1] http://dev.w3.org/csswg/css-images-3/#radial-gradients

Received on Monday, 2 December 2013 20:43:50 UTC