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

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