Re: [css-shapes] Functional Notation

On 10/02/2013 09:20 AM, fantasai wrote:
> On 10/01/2013 08:15 PM, Alan Stearns wrote:
>> fantasai wrote:
>>
>>> As for the circle() and gradient() notations, I think actually we
>>> should align with the same syntax as radial gradients. Authors
>>> shouldn't have to learn two completely different syntaxes for
>>> expressing the same shape. Probably rectangle() should be handled
>>> similarly as well...
>>
>> Good lord - I thought we actually had to be at last call before we handled
>> these kind of renaming shenanigans. Are you asking for this?
>>
>> circle( <size> [ at <position> ]? )
>
> Yes.
>
>> And what do you mean by handling rectangle() similarly? I'd really like to
>> see some sample declarations.
>
> rectangle( <size> [ at <position> ]? )
>
> inset-rectangle( <offset>{1,4} ) /* handle like margin shorthand */

Couple of implications I noted:

   1. Because this allows the full <position> syntax, it also lets
      you position things from e.g. the bottom right corner, rather
      than just the top left.

   2. It also solves my concern about writing-mode-relative shapes. :)
      Once we add start/end keywords to the <position> syntax, it'll
      Just Work here as well.

      (It's possible someone might want a writing-mode-relatively-shaped
      polygon, but I think that's pretty advanced and we don't need
      to worry about it atm. And that can be handled by keywords to the
      first argument in polygon().)

Overall, I think this is a total win!

~fantasai

Received on Wednesday, 2 October 2013 17:53:11 UTC