Skip to main content

Playing with Infinity in CSS

There’s not many blog posts that upset the natural order of CSS, but I’m still reeling from this one by Will Boyd where, back in February, he wrote about the infinity constant in CSS.

You can use it just like this...

.element {
	z-index: calc(infinity);

...and that’ll always be the biggest z-index on the page. That’s neat! And...weird? It’s definitely worth checking out Will’s list of practical examples of infinity, too.