Re: [css-shapes] Functional Notation

On 10/8/13 1:08 AM, "Dirk Schulze" <dschulze@adobe.com> wrote:

>
>On Oct 8, 2013, at 12:04 AM, fantasai <fantasai.lists@inkedblade.net>
>wrote:
>
>> On 10/05/2013 10:36 AM, Brad Kemper wrote:
>>> 
>>> That is basically 'rect()', isn't it? Rect() has commas to
>>>disambiguation itself from the earlier version. Both versions are bad.
>>>I don't use it often, because it's dependence on positioning severely
>>>limit its usefulness. But when I do, I have to remember what version
>>>has commas, and which version is the harder to use one (the old
>>>version, which made me do arithmetic). The new version has commas, but
>>>that's more unusual in CSS.
>> 
>> No, rect() is weird. The numbers are all offsets from the top/left
>> corner. inset-rect() is like margins, each side is inward from its
>> respective edge.
>> 
>> Which is why imo the syntax should *be* exactly like margins:
>>   inset-rect( [<length>|<percentage]{1,4} )
>> and fill in the exact same way.
>
>I agree.

Well, it's not *exactly* like margins, since margins don't define rounded
corners. If we're not requiring all four values, then we're back to
minting a keyword to separate the rounded corner values:

inset-rect( <shape-arg>{1,4} [ round <shape-arg>{1,2} ]? )

In which case we should have the same keyword in rectangle():

rectangle( <shape-arg>{4,4} [ round <shape-arg>{1,2} ]? )

Thanks,

Alan

Received on Tuesday, 8 October 2013 10:59:25 UTC