- From: Tab Atkins Jr. via GitHub <noreply@w3.org>
- Date: Wed, 04 Feb 2026 22:26:34 +0000
- To: public-css-archive@w3.org
> An example would be `translate` that takes two values. By using `--x property-shared` and `--y property-shared` you can generate two _different_ random values for the x and y translation parts of the `translate` property. Those values are then reused within other occurrences of that property. No, this will work by default. In `transform: random(property-shared, -100%, 100%) random(property-shared, -100%, 100%)`, the first instance has a caching key of `(null, "transform 0", null)`, while the second has `(null, "transform 1", null)`, so they'll generate different values. But other elements using the same declarations will share their `transform` values. If you want multiple usages of a random() *within an element* to be shared, you'd use `element-shared`. Otherwise, every random() on a given element is different. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13132#issuecomment-3850057462 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 4 February 2026 22:26:35 UTC