this post was submitted on 06 Oct 2023
3 points (80.0% liked)

WebDev

37 readers
1 users here now

founded 2 years ago
 

Whenever I use z-indexes, I am going to regret it at some point, especially with libraries utilizing components. Let’s see if we can avoid them all together.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago (1 children)

Not that I disagree, but if you do use them, understand how stacking contexts work (and use e.g. z-index: 0 to create a new stacking context where appropriate).

[–] [email protected] 1 points 1 year ago

I have even mentioned stacking contexts in the article, and the thing is that they are not only introduce with z-index, which makes them even more complex :-/ So yeah, it certainly helps if you understand them, but I think it does not make the problem less complex.