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

Re: border-radius on replaced elements

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 14 Aug 2008 22:05:15 +0100
Message-ID: <48A49E0B.8060501@inkedblade.net>
To: David Hyatt <hyatt@apple.com>
CC: www-style <www-style@w3.org>

David Hyatt wrote:
> 
> With the image-fit and image-position properties and border-radius, 
> we're clearly moving in a direction where overflow needs to be supported 
> on replaced elements.  One of the use cases that has come up over and 
> over again for Apple has been rounded corners on <img> and <video> 
> elements.  I believe that - by default - a border-radius should clip the 
> foreground content of replaced elements.  However I also think that the 
> foreground content of replaced elements could be considered overflow 
> (for compatibility with the image-fit and image-position properties).
> 
> I'd like to propose that the suggested UA default be:
> 
> img, video, input[type=image] { overflow: hidden }
> 
> For these elements (and possibly some others that I might not be 
> thinking of).
> 
> Alternatively we could just allow UAs to apply the border-radius clip to 
> replaced elements at their discretion.  I believe it's important that 
> authors not have to do anything to get the right behavior, though, since 
> the author expectation is that the border-radius should clip the image.

I've added a non-normative note saying
   It is recommended that the UA stylesheet apply overflow: hidden to
   elements (such as the <img> element in HTML) that are expected to be
   replaced elements so that their corners automatically trim to the
   border radius.

I can make this normative if you like.

~fantasai
Received on Thursday, 14 August 2008 21:05:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:11 GMT