Re: [css-shapes] Functional Notation

On Oct 2, 2013, at 8:03 PM, Alan Stearns <stearns@adobe.com> wrote:

> On 10/2/13 10:52 AM, "fantasai" <fantasai.lists@inkedblade.net> wrote:
> 
>> 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.
> 
> I'm not sure this does what you're implying. You could specify the
> position using those keywords, but that would only give you additional
> ways of specifying the top left corner of a rectangle, or the center of a
> circle. It's nice, but it's sugar, not new functionality.


Furthermore we were in an agreement that <position> is a mistake that we can't undo because of existing implementations. At least for backgrounds. We decided that we do not want to make the mistake (for instance on CSS Transforms) again. People should use calc instead of the heavy syntax and implication that <position> brings.

Dirk

> 
>> 
>>  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.
> 
> I think a keyword like this could be added to either argument syntax. I'm
> in the middle of an email summarizing the two options - hopefully I can
> get it posted in the next few minutes before the thread passes it by
> completely.
> 
> Thanks,
> 
> Alan
> 
> 

Received on Wednesday, 2 October 2013 18:17:19 UTC