8 ms·
Experimenting with Random() in CSS
- vintagedave 3mo agoA 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.
- LoganDark 3mo agoThere 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?
- Stitch4223 3mo agoThere is movie at the top that shows three renders of the same thing next to each other so the randomness can easily be spotted.
- mrbluecoat 3mo agoI especially liked the aurora demo. Nice example!
- kilian 3mo agoThe point isn't showing what they look like, it's that the result is randomized. Screenshots aren't, so that kind of defeats the purpose. The article starts with instructions on how to actually see and interact with the demos (the easiest is to use https://polypane.app https://polypane.app ), as well as a video showing all the demos from the article running in Polypane.
- g- 3mo agoDidn'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)
- MartijnBraam 3mo agoBokeh doesn't have different blur for different circles, it's always projecting the exact shape of the aperture.
- smallnix 3mo agoThis might produce unpleasant clusters of the same color ("clustering illusion"), if the values are really randomly distributed.