W3C home > Mailing lists > Public > www-style@w3.org > September 2008

Re: border-radius on replaced elements

From: <brkemper@comcast.net>
Date: Wed, 10 Sep 2008 21:15:25 +0000
To: fantasai <fantasai.lists@inkedblade.net>, Brad Kemper <brkemper.comcast@gmail.com>
Cc: David Hyatt <hyatt@apple.com>, www-style <www-style@w3.org>
Message-Id: <091020082115.7104.48C838ED0004DFA000001BC022070216339D0A9F030A059D0D@comcast.net>

> Brad Kemper wrote:
> So, I suppose I am proposing that the curve of the border-radius DOES act as a 
> mask of its contents, if the element with the border-radius is set to "overflow: 
> hidden" (or any overflow value other than "visible"). It doesn't really make 
> sense to me that the mask created by "overflow: hidden" should be a square 
> cornered rectangle, when the shape of the element doing the clipping does not 
> have square corners.

I would add that this might require a change to the CSS 2.1 section on overflow[1].

hidden: ...content is clipped and that no scrolling user interface should be provided to view the content outside the clipping region...
[the term "clipping region" is not defined for overflow]

So, I would add to that:
The clipping region for 'hidden' and 'scroll' is defined as the shape formed by the intersection of the padding box and the inner edge of the border radii of its corners.

111.1.1 says:
...four 'auto' values result in the clipping region being the same as the element's border box

A border box is defined elsewhere[2] as:
The border edge surrounds the box's border. If the border has 0 width, the border edge is the same as the padding edge. The four border edges define the box's border box.

That seems incomplete, due to the fact that the "edge [that] surrounds the box's border" may have rounded corners. Does this mean that a border box is the same shape as the rounded corner shape? If so, then the border edge is not the same as the padding edge if the border has 0 width, because the padding edge has sharp 90 corners. And then should it also say that the "four border edges and the border-radius property define the box's border box"? On the other hand, redefining  "border box" to include rounded corners might have too great a ripple effect. Maybe it would be better to explicitly say "The border edge, not including the effects of border-radius and border-image, surrounds the box's border." Then for "clip" you could say "The four border edges (not including the effects of border-radius and border-image) define the box's border box".

[1] http://www.w3.org/TR/2007/CR-CSS21-20070719/visufx.html#overflow-clipping
[2] http://www.w3.org/TR/2007/CR-CSS21-20070719/box.html#padding-edge
Received on Wednesday, 10 September 2008 21:16:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:39 UTC