@@ -2087,7 +2087,7 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
2087
2087
<pre class=prod>
2088
2088
<random()> = random( <<random-value-sharing>> ? , <<calc-sum>> , <<calc-sum>> , <<calc-sum>> ? )
2089
2089
2090
- <dfn><<random-value-sharing>></dfn> = [ [ auto | <<dashed-ident>> ] || match- element ]
2090
+ <dfn><<random-value-sharing>></dfn> = [ [ auto | <<dashed-ident>> ] || element-shared ]
2091
2091
| fixed <<number [0,1]>>
2092
2092
</pre>
2093
2093
@@ -2181,7 +2181,7 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
2181
2181
via the ''random()/auto'' or ''random()/<dashed-ident>'' values
2182
2182
* between [=random functions=] used for the same thing
2183
2183
in the styles across several elements,
2184
- via the ''random()/match- element'' value (or its absence)
2184
+ via the ''random()/element-shared '' value (or its absence)
2185
2185
2186
2186
<dl dfn-type=value dfn-for="random(),<random-value-sharing> ">
2187
2187
: <dfn>auto</dfn>
@@ -2199,8 +2199,8 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
2199
2199
ones with different <<dashed-ident>> s
2200
2200
will use distinct [=random base values=] .
2201
2201
2202
- : <dfn>match- element</dfn>
2203
- :: If ''random()/match- element'' is omitted,
2202
+ : <dfn>element-shared </dfn>
2203
+ :: If ''random()/element-shared '' is omitted,
2204
2204
[=random functions=] on different elements
2205
2205
will use distinct [=random base values=] .
2206
2206
@@ -2264,8 +2264,8 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
2264
2264
2265
2265
<pre highlight=css>
2266
2266
.shared-random-rect {
2267
- width: random(match- element, 100px, 200px);
2268
- height: random(match- element, 100px, 200px);
2267
+ width: random(element-shared , 100px, 200px);
2268
+ height: random(element-shared , 100px, 200px);
2269
2269
}
2270
2270
</pre>
2271
2271
@@ -2276,8 +2276,8 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
2276
2276
2277
2277
<pre highlight=css>
2278
2278
.shared-random-squares {
2279
- width: random(--foo match- element, 100px, 200px);
2280
- height: random(--foo match- element, 100px, 200px);
2279
+ width: random(--foo element-shared , 100px, 200px);
2280
+ height: random(--foo element-shared , 100px, 200px);
2281
2281
}
2282
2282
</pre>
2283
2283
</div>
@@ -2296,7 +2296,7 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
2296
2296
This ensures that every auto-generated name on a single element is unique,
2297
2297
and thus will get their own [=random base value=] .
2298
2298
It also ensures that declarations like
2299
- ''.foo { width: random(match- element, 100px, 200px); }''
2299
+ ''.foo { width: random(element-shared , 100px, 200px); }''
2300
2300
will cause all the ''.foo'' elements to share a [=random base value=] for their width
2301
2301
(they all have the same auto-generated name, "width 0").
2302
2302
@@ -2305,10 +2305,10 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
2305
2305
2306
2306
<pre highlight=css>
2307
2307
.foo {
2308
- width: random(match- element, 100px, 200px);
2308
+ width: random(element-shared , 100px, 200px);
2309
2309
}
2310
2310
.bar {
2311
- width: random(match- element, 200px, 300px);
2311
+ width: random(element-shared , 200px, 300px);
2312
2312
}
2313
2313
</pre>
2314
2314
@@ -2351,8 +2351,8 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
2351
2351
so we must treat all elements as potentially related for this purpose.
2352
2352
If this is undesirable,
2353
2353
you can always supply a sufficiently unique <<dashed-ident>> yourself,
2354
- like ''random(--sidebar-width match- element, ...)'' on one set of elements
2355
- and ''random(--card-width match- element, ...)'' on another,
2354
+ like ''random(--sidebar-width element-shared , ...)'' on one set of elements
2355
+ and ''random(--card-width element-shared , ...)'' on another,
2356
2356
or ''random(--flicker, ...)'' and ''random(--glow, ...)'' on the different rules.
2357
2357
2358
2358
This is the one case where supplying a <<dashed-ident>>
@@ -2653,7 +2653,7 @@ Caching Random Values: the <<random-value-sharing>> value</h3>
2653
2653
among other [=random functions=] in the same property value.
2654
2654
2655
2655
2. An element ID identifying the element the style is being applied to,
2656
- or null if ''random()/match- element'' is specified in <<random-value-sharing>> .
2656
+ or null if ''random()/element-shared '' is specified in <<random-value-sharing>> .
2657
2657
3. A document ID identifying the {{Document}} the styles are from.
2658
2658
2659
2659
The "element ID" and "document ID" must have the same lifetimes and equivalence
@@ -2672,8 +2672,8 @@ Caching Random Values: the <<random-value-sharing>> value</h3>
2672
2672
2673
2673
<pre highlight=css>
2674
2674
.random-square {
2675
- width: random(--foo match- element, 100px, 500px);
2676
- height: random(--foo match- element, 100px, 500px);
2675
+ width: random(--foo element-shared , 100px, 500px);
2676
+ height: random(--foo element-shared , 100px, 500px);
2677
2677
}
2678
2678
</pre>
2679
2679
@@ -2684,7 +2684,7 @@ Caching Random Values: the <<random-value-sharing>> value</h3>
2684
2684
with a size somewhere between ''100px'' and ''500px'' .
2685
2685
Additionally, <em> every</em> ''.random-square'' element on the page
2686
2686
will have the same size,
2687
- since ''match- element'' was specified.
2687
+ since ''element-shared '' was specified.
2688
2688
In fact, completely unrelated styles using the same ''random()'' function
2689
2689
will also end up sharing that value.
2690
2690
@@ -2770,8 +2770,8 @@ Caching Random Values: the <<random-value-sharing>> value</h3>
2770
2770
and this ends up defining a random <em> rectangle</em> ,
2771
2771
rather than a square.
2772
2772
2773
- Similarly, a ''match- element'' in the <<random-value-sharing>>
2774
- won't determine its "element identifier"
2773
+ Similarly, a lack of ''random()/ element-shared '' in the <<random-value-sharing>>
2774
+ won't cause the function to determine its "element identifier"
2775
2775
until substitution actually happens,
2776
2776
which might be <em> after</em> '--size' has inherited through multiple elements,
2777
2777
so again multiple elements using ''var(--size)''
0 commit comments