Root element should always establish a stacking context
Categories
(Core :: Layout: Positioned, defect)
Tracking
()
People
(Reporter: Oriol, Unassigned)
Details
Attachments
(1 file)
853 bytes,
text/html
|
Details |
https://www.w3.org/TR/CSS22/visuren.html#propdef-z-index defines z-index: auto
with
If the box has
position: fixed
or if it is the root, it also establishes a new stacking context.
https://drafts.csswg.org/css-position/#stacking
The root element always forms a stacking context regardless.
Blink and WebKit are correct, the root element always establishes a stacking context.
But Firefox doesn't establish a stacking context for z-index: auto
with position: relative
or position: absolute
.
Comment 1•2 years ago
|
||
I read the normative text as "it's the root box", not the root element's primary box fwiw...
Comment 2•2 years ago
|
||
Should be easy to add an IsRootElememtStyle check to IsStackingContext tho, perhaps.
Reporter | ||
Comment 3•2 years ago
|
||
Isn't the root box always generated by the root element? Since display: contents
can't be used on the root element.
Comment 4•2 years ago
|
||
The root box is different from the root element's primary box in Gecko, see this.
Updated•2 years ago
|
Description
•