94
jchw
8y

Hey frontend developers. If you do THIS:

z-index: 1000;

...expecting that it will ensure your div will be on top no matter what, I'm about to fuck your world up. Check this shit out:

z-index: 1001;

Comments
  • 4
    Fuck it completely. The max z-index is 2147483647, as set by browser. There are no limits in the css spec itself.
  • 8
    One of the most misused and misunderstood CSS property.
  • 1
    Why on Earth people declare indexes like this when you can declare elements and use index() to get the element layer's index automatically.

    Search sassy z-index.
  • 3
    Oh god, I can relate... Had to file a change request this week, because some developer years ago thought
    "what? You're gonna write z-index: 1001"?
    Content of the change request: "Raise z-index of this class from 99999 to 1000000000 to overlay hard-coded 'z-index: 999999999'".
    Fuck you, past developer!
  • 4
    This is nothing like my colleague adding pointer-events: none; on the video banner's container then he spent 2 hours in despair trying to make the "read more" button work
  • 2
    It also reminds me of a back end developer I used to know that would use position: absolute; left:-99999px; to hide an HTML element XD
  • 1
    I use 9001
Add Comment