alt.hn

6/24/2026 at 12:51:21 PM

Experimenting with Random() in CSS

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

by kilian

6/28/2026 at 9:17:00 AM

A real shame that they didn't include screenshots of what the results look like. Not only do they note browsers that don't support it yet, they even note that the samples might not survive changes in the future.

So I scrolled, saw a lot of code, nothing showing the result.

by vintagedave

6/28/2026 at 10:14:30 AM

There is movie at the top that shows three renders of the same thing next to each other so the randomness can easily be spotted.

by Stitch4223

6/28/2026 at 1:20:53 PM

I especially liked the aurora demo. Nice example!

by mrbluecoat

6/28/2026 at 9:40:46 AM

There are a ton of interactive demos for me on Safari 27, and at the top of the article there's also a video. What isn't showing up for you?

by LoganDark

6/28/2026 at 10:29:15 AM

I use Google Chrome, and it doesn't show up for me either

by jdw64

6/28/2026 at 11:29:42 AM

It's behind a flag, if you want to play with it. (The easiest way is usually just to test in Canary.)

by Sesse__

6/28/2026 at 12:09:47 PM

Bokeh doesn't have different blur for different circles, it's always projecting the exact shape of the aperture.

by MartijnBraam

6/28/2026 at 1:16:21 PM

This might produce unpleasant clusters of the same color ("clustering illusion"), if the values are really randomly distributed.

by smallnix

6/28/2026 at 10:44:37 AM

Didn't there exist convoluted ways to get random numbers in CSS before this? (I think some would even manipulate the DOM and re-read the changed values since those operations have randomness apparently)

by g-