Re: Border-radius proposal

On Wed, Jun 30, 2010 at 16:40, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Sun, Jun 27, 2010 at 7:11 AM, Sean Edison-Albright
> <sean.albright+css@gmail.com> wrote:
>> Greetings, all!
>>
>> The moderator of css-d suggested this might be a more appropriate
>> forum for this proposal.  I was wondering if anyone had considered
>> allowing negative arguments to the border-radius property to create a
>> sort of scooped-out rounded corner -- like you might see on an
>> old-fashioned movie ticket or a decorative border.  It seems like a
>> fairly logical, and useful extension of the existing behavior.  What
>
> While that sort of border effect could be useful, allowing it through
> a negative argument on border-radius doesn't seem like a great way to
> do it.  What happens if you specify both the height and width of a
> corner, and one is positive but the other negative?
>
> If we want multiple different corner styles (we do), then we should
> address that directly through a separate property.  That way we can
> present normal corners, scooped corners like you describe, and several
> others, like dogear corners (just a straight line  cutting it off).
>
> That way you'd create a scooped corner with something like this:
>
> foo {
>  border-radius: 8px;
>  border-radius-style: scooped;
> }
>
> ~TJ
>
>

While I agree that a "border-radius-style" property would be a more
appropriate solution than using negative values, there isn't a
"box-shadow-style" property for inset shadows.

I think it would be clearer to, if this proposal might make it to the
spec, be consistent and either add a "scooped" keyword to the
"border-radius" property value, or add a property named
"box-shadow-style". Since the latter has been implemented by various
vendors already, my preference would be the following (where "normal"
would be the default value):

foo {
    border-radius: 2em 1em 4em / 0.5em 3em scooped;
}

Con is that the border-radius shorthand gets fairly complex using this
approach..

Peter

Received on Wednesday, 30 June 2010 15:17:21 UTC