@@ -113,7 +113,7 @@ The registered syntax of the property is <em>not</em> checked at parse time.
113
113
Note: However,
114
114
the syntax is checked at computed-value time,
115
115
before substitution via ''var()'' .
116
- See [[#computed-value ]] .
116
+ See [[#calculation-of- computed-values ]] .
117
117
118
118
<details class=note>
119
119
<summary> Why aren't custom properties syntax-checked?</summary>
@@ -163,7 +163,7 @@ See [[#computed-value]].
163
163
Calculation of Computed Values {#calculation-of-computed-values}
164
164
----------------------------------------------------------------
165
165
166
- The [=computed value=] of a [=registered property=]
166
+ The [=computed value=] of a [=registered custom property=]
167
167
is determined by the syntax it's registered with.
168
168
169
169
Note: All properties, regardless of registered syntax,
@@ -172,26 +172,30 @@ such as ''inherit'' or ''revert''.
172
172
These are handled at [=specified value=] time,
173
173
as defined in [[css-cascade-4#defaulting-keywords]] .
174
174
175
- For <code> "<length>"</code> values,
176
- the computed value is the absolute length expressed in pixels.
177
-
178
- For <code> "<length-percentage>"</code> values,
179
- the computed value is one of the following:
180
-
181
- * if the specified value contains only length units,
182
- the computed value is the absolute length expressed in pixels.
183
- * if the specified value contains only percentages,
184
- the computed value is a simple percentage.
185
- * otherwise, the computed value is a calc expression
186
- containing an absolute length expressed in pixels,
187
- and a percentage value.
188
-
189
- For <code> "<angle>"</code> , <code> "<time>"</code> and <code> "<resolution>"</code> values,
190
- the computed value is the value expressed in its [=canonical unit=] ,
191
- with ''calc()'' expressions evaluated [[css-values-4#calc-computed-value|as described in CSS Values]] .
175
+ For <code> "<length>"</code> ,
176
+ <code> "<length-percentage>"</code> ,
177
+ <code> "<angle>"</code> ,
178
+ <code> "<time>"</code> ,
179
+ <code> "<resolution>"</code> ,
180
+ <code> "<integer>"</code> ,
181
+ <code> "<number>"</code> ,
182
+ and <code> "<percentage>"</code> values:
183
+
184
+ * If the specified value is a [=dimension=] literal
185
+ (such as ''50em'' or ''.2s'' ),
186
+ the computed value is the same value,
187
+ but with the unit converted to the corresponding [=canonical unit=]
188
+ for the type of value.
189
+ * If the specified value is any other numeric literal
190
+ (such as ''5'' or ''20%'' ),
191
+ the computed value is as specified.
192
+ (In particular, percentages are never resolved against anything.)
193
+ * If the specified value is a function that evaluates to one of those types
194
+ (such as a [=math function=] ),
195
+ the computed value is defined by that function.
192
196
193
197
For <code> "<color>"</code> values,
194
- the value is computed as described in [[css-color-4# resolving- color- values] ] .
198
+ the value is computed by [= resolving color values= ] .
195
199
196
200
For <code> "<custom-ident>"</code> , ident, or <code> "*"</code> values,
197
201
the computed value is as specified.
@@ -204,28 +208,17 @@ the computed value is one of the following:
204
208
* otherwise, the computed value is as specified.
205
209
206
210
For <code> "<image>"</code> values,
207
- the computed value is as specified,
208
- except that relative URLs that appear in the value are resolved to absolute URLs
209
- as described in [[!css3-values]] ,
210
- and all lengths are resolved to their computed values.
211
+ the computed value is the [=computed <image>=] .
211
212
212
- For <code> "<integer>"</code> , <code> "<number>"</code> and <code> "<percentage>"</code> values,
213
- the computed value is one of the following:
214
-
215
- * if the specified value is a ''calc()'' expression,
216
- the computed value is the evaluated result of that expression.
217
- * otherwise, the computed value is as specified.
218
-
219
- For <code> "<transform-function>"</code> values
220
- (including those contained in <code> "<transform-list>"</code> values),
213
+ For <code> "<transform-function>"</code> and <code> "<transform-list>"</code> values,
221
214
the computed value is as specified but with all lengths resolved to their computed values.
222
215
223
- For values specified by a syntax string that include "|" clauses,
224
- the computed value is given by applying the calculation rules
225
- for the first clause that matches to the specified value.
216
+ For values with [[#multipliers|multipliers]] ,
217
+ the computed value is a list of the computed values of the base type.
226
218
227
- For list values,
228
- the computed value is a list of the computed values of the primitives in the list.
219
+ For syntaxes specified with [[#combinator|the | combinator]] ,
220
+ the computed value is given by applying the computed-value rules
221
+ for the first clause that matches to the specified value.
229
222
230
223
231
224
Animation Behavior of Custom Properties {#animation-behavior-of-custom-properties}
0 commit comments