z-index and Stacking ContextsStacking contexts and the z-index property are closely connected and can be
influenced by any number of properties from position to isolation as
summarized in the blog post
Putting Things on Top of Other Things:
z - index !== "auto" &&
(position !== "static" || parentElement.style.display === ("flex" || "grid"));
opacity !== 1;
transform !== "none";
mix - blend - mode !== "normal";
filter !== "none";
perspective !== "none";
isolation === "isolate";
position === "fixed";
The post was written in 2018, today we can also include the will-change
property and some values of the clip-path property. There may be more (haven’t
been able to find a complete list within the standard pages themselves).
overflow: hiddenz-index (Codrops)z-index in CSS (Shaheed Ahmad)| [Solve your z-index issues | z-index and stacking context explained (Kevin Powell)](https://www.youtube.com/watch?v=uS8l4YRXbaw) |