You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
nt1m
changed the title
[css-values-5] Should random() function caching key work over computed values?
[css-values-5] Should random() function caching key work over used values?
Feb 19, 2025
<length> is absolutized to canonical units at computed-value time, so basing caching on computed values would have the same problem. And basing it on specified values seems weird?
Putting #11742 to the side for now, I don't have a real opinion on how this is resolved. The caching key is just constructed from the arguments to make it more likely that it's page-unique by default.
I don't think we really have a defined notion of "equality" for specified values. In theory we could make it based on token streams or source text, if we really wanted it to be stable?
Right now, it works over used values as specified by https://drafts.csswg.org/css-values-5/#random-caching , but that leads to weird behavior where resizing a window will cause new random values to be computed when viewport units are used: https://bugs.webkit.org/show_bug.cgi?id=287918
cc @tabatkins @weinig @smfr
The text was updated successfully, but these errors were encountered: