W3C home > Mailing lists > Public > www-style@w3.org > April 2010

Re: [css3-background] Curved borders intersecting backgrounds of inner boxes

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 12 Apr 2010 22:36:39 -0700
Cc: Zack Weinberg <zweinberg@mozilla.com>, fantasai <fantasai.lists@inkedblade.net>, W3C Emailing list for WWW Style <www-style@w3.org>
Message-Id: <E85DF699-BFA9-4B90-8AD0-ED44113E0F34@gmail.com>
To: Brian Manthos <brianman@microsoft.com>

On Apr 12, 2010, at 6:47 PM, Brian Manthos wrote:

>> If we do look at  'background-clip', then perhaps we use whichever one
>> in the background that is biggest. 
> 
> <style>
> 	H1, H2, H3
> 	{
> 		border:1px;
> 		border-radius:25%;
> 		padding:1px;
> 	}
> 	H1 {
> 		background-clip:border-box,padding-box,content-box;
> 	}
> 	H2 {
> 		background-clip:padding-box,content-box;
> 	}
> 	H3 {
> 		background-clip:content-box;
> 	}
> </style>
> 
> H1 should clip to the border-box curve, H2 to the padding-box curve, and H3 to the content-box curve.

That's what I'm thinking.

> Given that neither padding nor border widths can be negative, it remains conveniently simple.

I'm not sure I follow what you mean about the negative widths. Can you elaborate?


> I don't know the answer, but it looks like something needs to change or
>> be clarified. I WOULD like overflow to clip to the inner curve when
>> appropriate, and to me that means also clipping the straight portions
>> of the box too, to a box that aligns with those curves.
> 
> So if "background-clip:padding-box;" was added to this example...
> 	http://ieblog.members.winisp.net/misc/sylvain.border-radius.example2.html
> 
> then overflow clipping should clip to the white shape in the right rendering of this image...
> 	http://ieblog.members.winisp.net/images/sylvain_rounded_corners_2.png
> 
> 
> Is my interpretation correct?

That is my understanding, yes.



Received on Tuesday, 13 April 2010 05:37:15 GMT

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