Open Bug 1836588 Opened 1 years ago Updated 2 months ago

Implement CSS random() function

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

People

(Reporter: canadahonk, Unassigned)

References

(Blocks 1 open bug, )

Details

Implement the CSS random() function defined by CSS Values and Units Module Level 5.

No WPT tests exist currently (they should be added if implemented by us first). Not implemented or shipped by any engine yet.

Standards position: https://github.com/mozilla/standards-positions/issues/809

The standards position is currently negative so this likely won't be shipped or (internally) worked on (anytime soon at least). See also spec issue: https://github.com/w3c/csswg-drafts/issues/2826

The negative position on random() is unfortunate to hear. Over the past 10 years many SASS users have gotten use to using the math.random() module: https://sass-lang.com/documentation/modules/math/#random. Not having this in CSS proper could be a reason for people to not return to vanilla CSS.

You need to log in before you can comment on or make changes to this bug.