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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 19 Feb 2009 11:05:58 -0800
Message-ID: <499DAD96.5000601@inkedblade.net>
To: Zack Weinberg <zweinberg@mozilla.com>
CC: W3C Emailing list for WWW Style <www-style@w3.org>
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 GMT

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