CSS is getting native randomness 🎲

random() and random-item() are coming with:

- per-element randomness
- step-based ranges
- shared value options
- zero JS required

I wrote an overview of the feature, how it works, and what browsers support it.

https://alvaromontoro.com/blog/68092/native-random-values-in-css

#css #webDev

Native Random Values in CSS

The CSS Working Group has published the Values and Units Module Level 5, which introduces native mechanisms for generating random content using only CSS. This is the tl;dr of a longer article exploring randomness in CSS. :: Blog post at Alvaro Montoro's Personal Website.

Native Random Values in CSS

The CSS Working Group has published the Values and Units Module Level 5, which introduces native mechanisms for generating random content…

Medium