W3C home > Mailing lists > Public > www-style@w3.org > October 2013

Re: [css-shapes] Functional Notation

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 02 Oct 2013 10:52:43 -0700
Message-ID: <524C5D6B.5000800@inkedblade.net>
To: www-style@w3.org
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

This archive was generated by hypermail 2.3.1 : Wednesday, 2 October 2013 17:53:12 UTC