Re: [csswg-drafts] [css-values-5] The `<random-value-sharing>` options for `random()` are confusing (#13132)

> > 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.

Oh nice, even shorter then, no need for the `--x` and `--y` :)


-- 
GitHub Notification of comment by bramus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13132#issuecomment-3850107435 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:42:33 UTC