I don't think you've understood stacking contexts correctly. Both elements, and the ::before pseudo-element are all participating in the same stacking context. While it's true that the ::before pseudo-element is creating a new stacking context, that context isn't being used at all.
I don't think you've understood stacking contexts correctly. Both elements, and the ::before pseudo-element are all participating in the same stacking context. While it's true that the ::before pseudo-element is creating a new stacking context, that context isn't being used at all.
Hey Nicholas,
I'll try to come up with a better example, showing the actual stacking context example working.
Thanks for pointing this out!