Repository navigation
Description
Description
The random() function is a math function that represents a random value between a minimum and maximum value, drawn from a uniform distribution, optionally limiting the possible values to a step between those limits
left: random(10%, 20%);
left: random(10%, 20%, 5%);Specification
web-feature
random-function
Test Links
Additional Signals
developer signal (16 votes)
web-platform-dx/developer-signals#514
csswg:
https://github.com/w3c/csswg-drafts/issues?q=is%3Aissue%20state%3Aopen%20%22random()%22
still a few open issues. some specific to do with random() other about interaction with random-item(), @function
chrome:
https://issues.chromium.org/issues/413385732 (17 votes)
no Chrome platform status stats listing yet
Safari:
already in stable 26.2
https://webkit.org/blog/17640/webkit-features-for-safari-26-2/#css-calc-functions
https://webkit.org/blog/17285/rolling-the-dice-with-css-random/
already moving on to random-item()
Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=1836588 (3 votes)
mozilla/standards-positions#809 (positive)
Firefox now has a nightly flagged implementation:
https://bugzilla.mozilla.org/show_bug.cgi?id=2071165
coding2GO: CSS Can Finally Be Random
https://www.youtube.com/watch?v=Uy3xsfAD8s0
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity
github-actions commentedon Sep 3, 2026
This comment was automatically generated based on the information you provided. Please don't edit it.
Below is additional information about the web feature (from the web-features project) which is referenced in your proposal.
If this doesn't accurately correspond to your proposal, please update your initial comment to include
web-features: <feature-id>.To find feature IDs, use the web-features explorer.
Feature random()
random()CSS function chooses a random numeric value within a specified range. This allows for dynamic, randomized styling using CSS.random()CSS functionbigandy commentedon Sep 4, 2026
Blink Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/ERWNExcOwcg
o-t-w commentedon Sep 14, 2026
Firefox Intent to Prototype
jsnkuhn commentedon Sep 16, 2026
Firefox now has a nightly flagged implementation:
https://bugzilla.mozilla.org/show_bug.cgi?id=2071165
phantomxx29474 commentedon Nov 6, 2026
Firefox 161 has it.
https://groups.google.com/a/mozilla.org/g/dev-platform/c/g5tkE-lKw2U