Skip to content

Commit d9a632a

Browse files
committed
[css-values-5][editorial] Rename <random-caching-key> to <random-value-sharing>
1 parent d3f7935 commit d9a632a

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

css-values-5/Overview.bs

+19-19
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Commas in Function Arguments</h4>
136136
For example, the grammar of the ''random-item()'' function is:
137137

138138
<pre>
139-
random-item( <<random-caching-options>>, [<<declaration-value>>?]# )
139+
random-item( <<random-value-sharing>>, [<<declaration-value>>?]# )
140140
</pre>
141141

142142
The ''#'' indicates comma-separated repetitions,
@@ -1991,28 +1991,28 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
19911991
optionally limiting the possible values to a step between those limits:
19921992

19931993
<pre class=prod>
1994-
&lt;random()> = random( <<random-caching-options>>? , <<calc-sum>>, <<calc-sum>>, <<calc-sum>>? )
1994+
&lt;random()> = random( <<random-value-sharing>>? , <<calc-sum>>, <<calc-sum>>, <<calc-sum>>? )
19951995
1996-
<dfn><<random-caching-options>></dfn> = <dfn value for="random()|<random-caching-options>">auto</dfn> | [ <<dashed-ident>> || <dfn value for="random()|<random-caching-options>">match-element</dfn> ] | <<number [0,1]>>
1996+
<dfn><<random-value-sharing>></dfn> = <dfn value for="random()|<random-value-sharing>">auto</dfn> | [ <<dashed-ident>> || <dfn value for="random()|<random-value-sharing>">match-element</dfn> ] | <<number [0,1]>>
19971997
</pre>
19981998

19991999
Its arguments are:
20002000

20012001
<dl>
2002-
: <css><<random-caching-options>></css>
2003-
:: The optional <<random-caching-options>>
2002+
: <css><<random-value-sharing>></css>
2003+
:: The optional <<random-value-sharing>>
20042004
controls whether a given ''random()'' function
20052005
resolves similarly or differently to other [=random functions=] on the page.
20062006
See [[#random-caching]] for details.
20072007

2008-
If <<random-caching-options>> is omitted or specified as ''random()/auto'',
2008+
If <<random-value-sharing>> is omitted or specified as ''random()/auto'',
20092009
''random()'' functions on different properties,
2010-
and multiple ''random()'' functions within a sinlge property,
2010+
and multiple ''random()'' functions within a single property,
20112011
will resolve to different random values,
20122012
and will have different values on every element
20132013
styled with that property.
20142014

2015-
Providing <<random-caching-options>> makes it "less random":
2015+
Providing <<random-value-sharing>> makes it "less random":
20162016

20172017
* two ''random()'' functions on an element with the same <<dashed-ident>>
20182018
will use the same random value.
@@ -2173,7 +2173,7 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
21732173
If a ''random()'' function can't be [=simplify a calculation tree|simplified=]
21742174
by [=computed value=] time,
21752175
then it computes to its maximally-simplified form,
2176-
but with its <<random-caching-options>> set to its [=random base value=].
2176+
but with its <<random-value-sharing>> set to its [=random base value=].
21772177

21782178
<div class=example>
21792179
For example, given the declaration ''width: random(50%, 100%)'',
@@ -2234,19 +2234,19 @@ Picking a Random Item From a List: the ''random-item()'' function</h3>
22342234
from among its list of items.
22352235

22362236
<pre class=prod>
2237-
&lt;random-item()> = random-item( <<random-caching-options>> , [ <<declaration-value>>? ]# )
2237+
&lt;random-item()> = random-item( <<random-value-sharing>> , [ <<declaration-value>>? ]# )
22382238
</pre>
22392239

2240-
The <em>required</em> <<random-caching-options>>
2240+
The <em>required</em> <<random-value-sharing>>
22412241
is interpreted identically to ''random()''.
22422242
(See [[#random-caching]] for details.)
22432243

2244-
Note: The <<random-caching-options>> argument is required in ''random-item()'',
2244+
Note: The <<random-value-sharing>> argument is required in ''random-item()'',
22452245
but optional in ''random()'',
22462246
both for parsing reasons
22472247
(it's impossible to tell whether ''random-item(--foo, --bar, --baz)''
22482248
has three <<declaration-value>> arguments
2249-
or two and a <<random-caching-options>> argument),
2249+
or two and a <<random-value-sharing>> argument),
22502250
and because accidentally associating the random generation of ''random-item()'' functions together
22512251
is much easier to do accidentally,
22522252
since only the number of arguments is used to distinguish instances.
@@ -2297,7 +2297,7 @@ Evaluating Random Values</h3>
22972297

22982298

22992299
<h3 id=random-caching>
2300-
Caching Random Values: the <<random-caching-options>> value</h3>
2300+
Caching Random Values: the <<random-value-sharing>> value</h3>
23012301

23022302
In a programming language like JavaScript,
23032303
there's a clear temporal ordering to code,
@@ -2324,7 +2324,7 @@ Caching Random Values: the <<random-caching-options>> value</h3>
23242324
* Each instance of a [=random function=] in styles
23252325
has an associated <dfn>random base value</dfn>.
23262326

2327-
If the [=random function's=] <<random-caching-options>> is a <<number>>,
2327+
If the [=random function's=] <<random-value-sharing>> is a <<number>>,
23282328
the [=random base value=] is that number.
23292329

23302330
Otherwise, the [=random base value=] is a pseudo-random real number between 0 and 1,
@@ -2347,15 +2347,15 @@ Caching Random Values: the <<random-caching-options>> value</h3>
23472347

23482348
* A [=random caching key=] is a [=tuple=] of:
23492349
1. A [=string=] name: the value of the <<dashed-ident>>,
2350-
if specified in <<random-caching-options>>;
2350+
if specified in <<random-value-sharing>>;
23512351
or else a string of the form <code>"PROPERTY N"</code>,
23522352
where PROPERTY is the name of the property the [=random function=] is used in
23532353
(<em>before</em> shorthand expansion, if relevant),
23542354
and N is the index of the [=random function=]
23552355
among other [=random functions=] in the same property value.
23562356

23572357
2. An element ID identifying the element the style is being applied to,
2358-
or null if ''random()/match-element'' is specified in <<random-caching-options>>.
2358+
or null if ''random()/match-element'' is specified in <<random-value-sharing>>.
23592359
3. A document ID identifying the {{Document}} the styles are from.
23602360

23612361
The "element ID" and "document ID" must have the same lifetimes and equivalence
@@ -2466,13 +2466,13 @@ Caching Random Values: the <<random-caching-options>> value</h3>
24662466
(or even recognized *as* a ''random()'' function)
24672467
in ''--size'',
24682468
so the default rules for an omitted <<dashed-ident>>
2469-
in the <<random-caching-options>> isn't applied.
2469+
in the <<random-value-sharing>> isn't applied.
24702470
Instead, it's evaluated when it's substituted into 'width' and 'height',
24712471
so each gets a distinct [=random caching key=],
24722472
and this ends up defining a random <em>rectangle</em>,
24732473
rather than a square.
24742474

2475-
Similarly, a ''match-element'' in the <<random-caching-options>>
2475+
Similarly, a ''match-element'' in the <<random-value-sharing>>
24762476
won't determine its "element identifier"
24772477
until substitution actually happens,
24782478
which might be <em>after</em> '--size' has inherited through multiple elements,

0 commit comments

Comments
 (0)