Skip to content

Commit f857f23

Browse files
committed
[css-values-5][editorial] Give an informative mention of the element-scoped behavior in functions.
1 parent 2c10daa commit f857f23

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

css-values-5/Overview.bs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2806,6 +2806,12 @@ Sharing (Or Not) Random Values: the <<random-key>> value</h3>
28062806
<li><dfn>element-scoped</dfn> adds an element-specific identifier
28072807
to the [=random cache name=],
28082808
so different elements will get different random values.
2809+
2810+
If the [=random function=] is being evaluated inside of a [=custom function=],
2811+
the element-specific identifier is for the "hypothetical element"
2812+
that the function's styles are evaluated on,
2813+
so ''element-scoped'' will give you different random values
2814+
on every function invocation.
28092815
<li><dfn>property-scoped</dfn> adds the property name the [=random function=] is being used on
28102816
to the [=random cache name=],
28112817
so different properties will get different random values.

0 commit comments

Comments
 (0)