Open Bug 1834403 Opened 2 years ago Updated 2 years ago

Root element should always establish a stacking context

Categories

(Core :: Layout: Positioned, defect)

defect

Tracking

()

People

(Reporter: Oriol, Unassigned)

Details

Attachments

(1 file)

Attached file testcase.html

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.

I read the normative text as "it's the root box", not the root element's primary box fwiw...

Should be easy to add an IsRootElememtStyle check to IsStackingContext tho, perhaps.

Isn't the root box always generated by the root element? Since display: contents can't be used on the root element.

The root box is different from the root element's primary box in Gecko, see this.

Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: