[csswg-drafts] [css-values] random() function

bendc has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values] random() function ==
Hi,

I see many authors (myself included) rely on JavaScript's `Math.random()` to generate a number they can then use to randomize colors, positions, animation delays etc. While it's fairly straightforward to do so (notably with custom properties), a potential `random` function (or keyword) in CSS would make a lot of sense, especially in conjunction with `calc()` and friends.

AFAICT @tabatkins proposed something similar quite a few years ago, but I don't think we've discussed it recently, and I think we should reevaluate this option now that we have more context and background on how custom properties and mathematical expressions are being used in CSS.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2826 using your GitHub account

Received on Tuesday, 26 June 2018 10:09:38 UTC