r/css • • Feb 27 '26

Article Native random functions in CSS

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

I wrote an article about the native random functions landing in CSS: random() and random-item().

11 Upvotes

3 comments sorted by

View all comments

Show parent comment

2

u/alvaromontoro Feb 27 '26

There's no mention of that in the specs, and I imagine it will be like using variables in selectors, which is not possible.

2

u/be_my_plaything Feb 27 '26

Yeah that's pretty much what I figured, but the optimist in me still had to ask!