W3C home > Mailing lists > Public > www-style@w3.org > July 2009

Re: [css3-background] should radii be capped?

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 21 Jul 2009 14:12:41 -0700
Message-ID: <4A662F49.1070103@inkedblade.net>
To: Håkon Wium Lie <howcome@opera.com>
CC: www-style@w3.org
Håkon Wium Lie wrote:
> Also sprach fantasai:
> 
>  > > Opera, however, doesn't cap the radii but attempts to honor them. I
>  > > can see many uses for the elliptic expressions that this behavior
>  > > allows. The spec, instead, will leave us with many stadium-like
>  > > borders, as can be seen in the two leftmost Firefox renditions.
>  > 
>  > If you want an elliptic look, then set the two corner radii to two
>  > different values.
> 
> That's possible when you know the width and height of the box. But, if
> either the widths or height is unknown, it is impossible to get the
> elliptic shape in a static style sheet. For instance, this gives you
> an elliptic border:
> 
>   width: 100px; height: 200px; 
>   border: 1px solid red; 
>   border-radius: 50px / 100px;
> 
> However, when the size of the box changes the elliptic shape is gone. 
> 
> (It's probably possible to reinstantiate the elliptic shape through JS
> magic, be we should try to avoid that for common effects)
> 
>  > The goal of the formula is to preserve the shape
>  > of the curve
> 
> The question becomes: if preserving the shape of the curve worth the
> higher cost of achieving elliptic forms? 
> 
> If we remove the protection of the shape, what's the worst case
> scenario?

Authors get shapes they didn't intend.

You're using the radii reduction formula in Opera (you have one, it's just
different from the one in the spec) to hack an oval shape, that's not a
typical usual use-case. See responses by Tab and Brad.

What you want appears to be 'border-radius: 50%'. Yes? That's a different
feature, and one we can consider if there's agreement on what it should
do. (Mozilla used to have percentage border-radii, but because they didn't
allow elliptical corners it always resulted in quarter-circles.)

~fantasai
Received on Tuesday, 21 July 2009 22:13:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:19 GMT