W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2018

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

From: Benjamin De Cock via GitHub <sysbot+gh@w3.org>
Date: Tue, 26 Jun 2018 10:09:36 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-335748907-1530007775-sysbot+gh@w3.org>
bendc has just created a new issue for https://github.com/w3c/csswg-drafts:

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

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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:31 UTC