Re: [css3-background] allow <percentage> in border-radius properties?

Zack Weinberg wrote:
> We noticed while reviewing internal test cases for border-radius that
> Gecko permits <percentage> values for all border-radius properties,
> contra the spec which allows only <length>.  This has been the case for
> probably as long as Gecko has implemented any sort of curved border
> corners.  Percentages are taken as relative to the width of the
> border-box (not the content-box) to which the style applies.
> 
> What do y'all think of adding this extension to the spec?  As far as I
> can tell, no other implementation has this already, but it should not
> pose any serious difficulty either in the parser or the renderer.

So, one issue there is that in Gecko's original version, there was
only one radius. Your curves would always be a quarter-circle. In
CSS3, you have two. You can have elliptical curves. Instead of
percentages always referring to the width, you could also have
percentages referring to their respective dimension of the box.
We weren't sure what to do here, so we left that out. Another issue
in the decision was that if in the future we wanted to allow content
to respect the curve, it'd introduce a circular dependency. But
given the radii reduction algorithm for intersecting curves.. I think
border-radius will remain a paint-level operation anyway. So unless
I'm missing something, we could introduce percentages. But we'd have
to find out what behavior is most wanted.

~fantasai

Received on Thursday, 19 February 2009 19:06:41 UTC