7
kiki
20h

say what you want, but z-index: 99999 and z-index war in general means you’re an uneducated amateur.

Comments
  • 3
    Even I don't have them kiker.
  • 2
    @retoor “even”?
  • 2
    @kiki you know my css skills.
  • 4
    z-index: 4294967295 !important;
  • 3
    indeed. the only proper way to use z-index is `2147483647 !important`
  • 0
    Yup, it means that you either don‘t care about or have given up on understanding how the damn system works and just say "Fuck it, I‘m gonna use z-index".
  • 2
    @Lensflare

    1. you have to use position relative, absolute, fixed or sticky for z-index to work. If you just want z-index and nothing more, use position relative.

    2. z-index works intuitively within one container: the higher z-index is, the higher is the element.

    3. z-index of an element only matters within its parent. If your element has z-index of 9999 but it exists within a parent that has z-index of -1, the sibling to that parent that has z-index of 2 will come on top.

    4. if you use position: absolute or fixed, your parent is the document element, and thus your z-index will beat everything else.

    there are other edge cases, but those four rules will get you 99% there
  • 0
    In Adobe UXP you can make ui for plugin in css and HTML in adobe rendering engine. All inputs and scrollbars are in fact some c++ widgets with z-index infinity and beyond and you can't beat it. So when you open overlay you have to set overflow none else. So your scrollbars are not above overlay :-D 4 years and no fix on horizon.
Add Comment