Re: [csswg-drafts] [CSS-22][CSS-21][CSS3] Stacking context complicated

In fact the spec defines [`z-index: auto`]( with

> If the box has 'position: fixed' or if it is the root, it also establishes a new stacking context. 

It doesn't mention `position: sticky`, so it would seem they shouldn't create a stacking context. But of course CSS Position is not maintained and this is not reliable. I don't understand why, I think it's much more important than other things which are properly maintained.

So I tested a bit and it seems that both Firefox and Chrome create a stacking context, but Edge does not.

Firefox does it since its initial implementation in [bug 886646]( See comments [63](, [64]( and [66](

Basically, it seems they just copied webkit, which decided to make `position: sticky` behave like `position: fixed` in this regard, see Interestingly, `position: fixed` didn't create a stacking context back then on Firefox.

GitHub Notification of comment by Loirooriol
Please view or discuss this issue at using your GitHub account

Received on Friday, 16 February 2018 15:49:16 UTC