W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Re: Expected behavior of background-clip property on the html element?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 05 Jan 2011 21:46:31 -0800
Message-ID: <4D255737.4030500@mit.edu>
To: Cathy.Chan@nokia.com
CC: www-style@w3.org
On 1/5/11 7:03 PM, Cathy.Chan@nokia.com wrote:
> What is the expected behavior when the background-clip property is
> applied to the html element.

Good question.

> When I try this on the major browsers, all show the green background
> well beyond the bottom border. Additionally, content-box behaves exactly
> the same as either border-box (Chrome, FF, Safari) or padding-box
> (Opera). Which is correct? I'm guessing neither, but it's not
> immediately clear from the spec.

I suspect the key part here is this, from 
http://www.w3.org/TR/CSS21/colors.html#background :

   The background of the root element becomes the background
   of the canvas and covers the entire canvas, anchored (for
   'background-position') at the same point as it would be if it was
   painted only for the root element itself. The root element does
   not paint this background again.

So the background isn't being painted on the box for the <html> to start 
with, hence it would seem that the background-clip of the <html> box 
wouldn't apply, unless something somewhere explicitly says otherwise.

-Boris
Received on Thursday, 6 January 2011 05:47:37 GMT

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