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

Re: [css3-background] "Margins are always transparent" missing

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 9 Apr 2013 22:30:15 -0700
Message-Id: <35A025F7-AFCF-4080-BBAB-6C65792A8C3C@gmail.com>
Cc: W3C www-style mailing list <www-style@w3.org>
To: "www-style@gtalbot.org" <www-style@gtalbot.org>
On Apr 9, 2013, at 7:14 PM, "G¨Śrard Talbot" <www-style@gtalbot.org> wrote:

> Hello,
> 
> One particular statement from CSS 2.1 seems to be missing from CSS 3
> Backgrounds and Borders spec.
> 
> "
> 'background' refers to the background of the content, padding and border
> areas. (...) Margins are always transparent.
> "
> CSS 2.1, section 14.2 The background
> http://www.w3.org/TR/CSS21/colors.html#background
> 
> 
> "
> The background style of the content, padding, and border areas of a box is
> specified by the 'background' property of the generating element. Margin
> backgrounds are always transparent.
> "
> CSS 2.1, section 8.1 Box dimensions
> http://www.w3.org/TR/CSS21/box.html#box-dimensions
> 
> 
> The background (background-color and/or background-image) of an element
> never paints its margin area ... except for the root element, this being
> the only exception in this case ("The background of the root element
> becomes the background of the canvas and covers the entire canvas").
> 
> I can not find a similar statement anywhere in CSS 3 Backgrounds and
> Borders spec.
> 
> Actual
> ------
> Each box has a rectangular content area, a band of padding around the
> content, a border around the padding, and a margin outside the border.
> (The margin may actually be negative, but margins have no influence on the
> background and border.)
> 
> Proposed
> --------
> Each box has a rectangular content area, a band of padding around the
> content, a border around the padding, and a margin outside the border.
> <ins>Margins are always transparent.</ins> (The margin may actually be
> negative, but margins have no influence on the background and border.)
> 
> coming from
> CSS Backgrounds and Borders, section 1. Introduction
> http://www.w3.org/TR/css3-background/#introduction

This doesn't seem necessary. The margin is only mentioned non-normatively in that introductory section, and the background painting area is well defined in a way that does not include painting in the margins.

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

Also, technically, the border-image can paint into the margins, and so can the box-shadow. So maybe it would not clarify anything to stress the transparency of the margins. The margin itself is transparent, sure, but since this spec is not about the rendering of margins, I think the clear definitions of where things in this spec do paint are sufficient. 
Received on Wednesday, 10 April 2013 05:30:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 10 April 2013 05:30:46 UTC