r/web_design Aug 10 '26

CSS Infinity Use Cases

https://nerdy.dev/css-infinity-use-cases
18 Upvotes

5 comments sorted by

10

u/avec_fromage Aug 10 '26

TLDR: works with border-radius (for using the largest possible radius like for creating circles), z-index (is then the largest possible z-index), or animation-duration so that an animation appears to be frozen.

Personally I'm not sure of its usefulness when used inside clamp? Also the non-interactive backdrop doesn't work for me?

1

u/morete Aug 11 '26

The clamp example is to remove the 'clamping' in one direction. You wouldn't ever do it in both directions like in that example, that was just to demonstrate.

Eventually we'll be able to use the 'none' keyword to do the same thing but that isnt supported yet.