[css3-page] Each page-margin box establishes a stacking context

Hi,

I plan to rewrite §4.1. "Page Backgrounds and Painting Order" it terms 
of stacking contexts (as in Appendix E of CSS 2.1.)

This is mostly clarification, but there is one normative change: each 
page-margin box should establish a stacking context. This change does 
not make a difference with only CSS21 + css3-page, but might eg. if we 
allow regions (with positioned children) to flow into page-margin boxes.

Related:
https://www.w3.org/Style/CSS/Tracker/issues/303
https://www.w3.org/Style/CSS/Tracker/issues/314
http://lists.w3.org/Archives/Public/www-style/2013Feb/0653.html
http://lists.w3.org/Archives/Public/www-style/2013Feb/0652.html


Here is a draft of what I want to put in §4.1. Comments welcome:

---

The root stacking context paints, in order:

1. The page background
2. Its "children" in z-index order (most negative first), then (for 
equal z-index values) default order.

The root stacking context’s children are, in default order:

1. The "page contents" (this is a new concept, if you have name ideas …)
2. The page-margin boxes, in clockwise order starting with @top-left-corner

The z-index property always applies to page-margin boxes; they each 
establish a stacking context.

The "page contents" has a z-index value of 0 (which can not be changed.) 
It paints, in order:

1. The document’s canvas background
2. The page border
3. The document contents (ie. the root element)

---

Maybe this would be easier to explain if we had two different boxes 
instead of just one page box: one "root" box that has the background 
from @page, and one "content" box that has the document canvas’s 
background (propagated from the root element) and the border from @page.

Boxes generated by the root element are children of the "content" box. 
The "content" box and page-margin boxes are children of the "root" box.

The "content" box is closest to the current concept of "page box". The 
"root" name is not great: although it is really the root, it’s very 
different from the root element.

Naming ideas?

-- 
Simon Sapin

Received on Monday, 4 March 2013 10:23:57 UTC