Re: [css-shapes] Functional Notation

On 10/4/13 12:53 AM, "Dirk Schulze" <dschulze@adobe.com> wrote:

>
>The circle function could be
>
>    circle(<r> [ <cx> <cy>? ]?)
>
>And to get back to Francois' proposal with width, height, contain and
>cover:
>
>    circle([ <rx> | width | height | cover | contain ] [ <cx> <cy>? ]?)
>
>which allows things like
>
>    circle(cover)
>    circle(width 50% 0%)
>    circle(50px)

I think this works. Here's my proposal: we take the change above for
circles and ellipses, but otherwise keep the arguments to the current
shape functions as they are (minus the commas). We don't yet have a
pattern to follow that includes all of the rectangular arguments, and
changing some of the current functions to use
gradient/border/background-inspired syntax would not include polygon().
I'd rather keep the current set as consistent as possible.

However, once we define a way to include border-radius in the border
shorthand, then we would have a rectangle pattern to follow. At that point
we could introduce a new shape() function that used
gradient/border/background syntax. Gradients already have 'circle' and
'ellipse' keywords, so the new function could use gradient/border syntax
directly, and accommodate whatever future extensions we define.

shape(ellipse at center)
shape(circle farthest corner at 50% 50%)
shape(rectangle top left 50% 50% round 2em 1em 4em / 0.5em 3em)


Thanks,

Alan

Received on Friday, 4 October 2013 17:23:23 UTC