- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Fri, 07 Mar 2025 21:22:31 +0000
- To: public-css-archive@w3.org
> No they won't, because we're also including the element identity by default in the caching key. Ah, I missed that, ok. Sounds reasonable. > No, I don't think these identifiers should be author-exposed. If the author wants to tie things together, they should do it explicitly. Now that I've hit on the "just put the random number right in the function" solution, it's okay to make this value not author-exposed, so I agree. > or we say that getComputedStyle() returns the unresolved random and assigning the value back gets you a new random. (I don't think this would be entirely unexpected, tbh.) That's not the issue, it's that a registered custom property (and any *normal* property containing a % that requires layout) containing `random(100px, 200px)` would resolve before inheritance and be the same value on all inheriting elements, but one containing `random(10%, 20%)` would remain unresolved and inherit as `random()`, thus getting new random values on every element it inherits to. So we really do need to guarantee that we resolve the value in *some* way by computed value time. > (Tangential point: we should make sure map() and random() syntaxes are aligned.) Nah, random() is much closer in spirit to, say, `clamp()` than `map()`, and it does match those other math functions nicely. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11742#issuecomment-2707485695 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 7 March 2025 21:22:32 UTC