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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 11 Jan 2011 22:13:17 -0800
Message-ID: <4D2D467D.3010701@inkedblade.net>
To: Cathy.Chan@nokia.com
CC: www-style@w3.org
On 01/05/2011 07:03 PM, Cathy.Chan@nokia.com wrote:
> What is the expected behavior when the background-clip property is applied to
> the html element. For instance:
>
> html
> {
> border:15px dashed #354658;
> padding: 30px;
> background-color: green;
> background-clip: border-box;
> }
>
> Should the green color stop at the outer edges of the dashed border? How about
> when background-clip is padding-box or content-box?
>
> 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.

The spec says:

http://www.w3.org/TR/css3-background/#background-clip

# background-clip ... determines the <dfn>background painting area</dfn>.
# ...
# Note that the root element has a different background painting area.
# See “The backgrounds of special elements.”

http://www.w3.org/TR/css3-background/#special-backgrounds

# The background of the root element becomes the background of the canvas
# and its <em>background painting area</em> extends to cover the entire
# canvas

Exactly what is not clear?

~fantasai
Received on Wednesday, 12 January 2011 06:13:54 GMT

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