Experimenting with random() in CSS

Cherry blossom branches with petals falling across a blue sky, and the title “Experimenting with random() in CSS”.

Kilian Valkhof, on the Polypane blog, explores the new CSS random() function, which returns a random value between a minimum and maximum, with an optional step and an element-scoped keyword for consistent values per element. Demos include a bokeh effect, falling cherry petals, a draggable Polaroid stack, random poetry with if(), and an aurora. It works in Safari 26.2+ and Chromium 148+ behind a flag.

polypane.app/blog/experimenting-with-random-in-css