-
Notifications
You must be signed in to change notification settings - Fork 780
Open
Labels
Description
There is an existing issue about random() and other tree scope functions used outside element context, so it is unclear how random() should behave in @container style queries now. However we can also use random() in style() condition inside if():
color: if(style(random(--rand property index, 1, 1000) = random(--rand property index, 1, 1000)): green; else: red;);In the example above it's unclear whether both random() values should use same or different index for caching, in other words, what is the same property value in the statement below:
A nullable integer index: the index of the random function among other random functions in the same property value, if index or auto is specified; otherwise null.
if(style(random(1) = random(2)): random(3); else: random(4));
So are random(1), random(2), random(3) and random(4) all different property values?
cc: @tabatkins
Reactions are currently unavailable