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

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

From: Zack Weinberg <zweinberg@mozilla.com>
Date: Thu, 19 Feb 2009 12:03:06 -0800
To: fantasai <fantasai.lists@inkedblade.net>
Cc: W3C Emailing list for WWW Style <www-style@w3.org>
Message-ID: <20090219120306.5331fbb8@trurl>
fantasai <fantasai.lists@inkedblade.net> wrote:
> 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>...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.

Yeah.  I can argue either way, but on balance I prefer "always width"
because that way the behavior of "border-radius: 10%" with a
rectangular box is to give quarter-circles, consistent with
"border-radius: 10pt".  Also, the height of a box tends to be much
more variable than its width, so designers are more likely to want to
style relative to the width, I think.

> 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.

It would just be a system of simultaneous constraints, wouldn't it?

zw
Received on Thursday, 19 February 2009 20:03:50 GMT

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