DEV Community

Discussion on: Meme Monday

Collapse
 
alvaromontoro profile image
Alvaro Montoro

My attempt at creating a meme last week...

Geordi La Forge Meme: a black man wearing a Star Trek uniform with long goggles (that have the text CSS added to them for the meme). First, he has a hand out like asking to stop, next to the CSS code z-index: infinity. Below, he is half smiling and pointing in acceptance to the CSS code z-index:calc(infinity * 1)

Collapse
 
alvaromontoro profile image
Alvaro Montoro

Because CSS doesn't allow to use the math constants outside of math functions... Which makes total sense.

Also, it would work with just calc(infinity). I don't know why I added the * 1. Out of habit maybe.

Collapse
 
schemetastic profile image
Schemetastic (Rodrigo)

Did you know that there is a maximum z-index value? For example a 10 digit 9 value (9999999999) is not possible, the maximum possible z-index is 2147483647. So if you have an item with z-index: 9999999999 and another with infinity, technically they both would be 2147483647 and the winner would be the one who is placed after the other in the HTML.

Collapse
 
sh20raj profile image
Sh Raj

Thanks for the info bro

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

I've recently started using custom properties for z-indices to simulate a kind of "named layers" and I don't think I'll ever go back to keeping the funny numbers in sync.