I started with JS about 10 years ago and I fell in love with it (even though it can be weird 😅). I had step backs in my career that ended up being good. Currently I'm a passionate front-end developer.
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.
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
My attempt at creating a meme last week...
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.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.
Thanks for the info bro
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.