@@ -159,10 +159,74 @@ See [[#computed-value]].
159159 not a necessity like for UA-defined properties.
160160</details>
161161
162- Computed Value of Custom Properties {#computed-value}
163- -----------------------------------------------------
164162
165- Issue: Move computed value behavior here.
163+ Calculation of Computed Values {#calculation-of-computed-values}
164+ ----------------------------------------------------------------
165+
166+ The [=computed value=] of a [=registered property=]
167+ is determined by the syntax it's registered with.
168+
169+ Note: All properties, regardless of registered syntax,
170+ accept the [=CSS-wide keywords=] ,
171+ such as ''inherit'' or ''revert'' .
172+ These are handled at [=specified value=] time,
173+ as defined in [[css-cascade-4#defaulting-keywords]] .
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]] .
192+
193+ For <code> "<color>"</code> values,
194+ the value is computed as described in [[css-color-4#resolving-color-values]] .
195+
196+ For <code> "<custom-ident>"</code> , ident, or <code> "*"</code> values,
197+ the computed value is as specified.
198+
199+ For <code> "<url>"</code> values,
200+ the computed value is one of the following:
201+
202+ * if the URL is a relative URL,
203+ the computed value is the resolved absolute URL as described in [[!css3-values]] .
204+ * otherwise, the computed value is as specified.
205+
206+ 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+
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),
221+ the computed value is as specified but with all lengths resolved to their computed values.
222+
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.
226+
227+ For list values,
228+ the computed value is a list of the computed values of the primitives in the list.
229+
166230
167231Animation Behavior of Custom Properties {#animation-behavior-of-custom-properties}
168232----------------------------------------------------------------------------------
@@ -513,62 +577,6 @@ following members:
513577: <dfn dict-member for=PropertyDefinition>initialValue</dfn>
514578:: The initial value of this custom property.
515579
516- Calculation of Computed Values {#calculation-of-computed-values}
517- ----------------------------------------------------------------
518-
519- The syntax of a custom property fully determines how computed values are
520- generated from specified values for that property.
521-
522- The <a>CSS-wide keywords</a> and ''revert'' generate computed values as
523- described in [[!css3-values]] and [[!css-cascade-4]] respectively. Otherwise:
524-
525- For <length> values, the computed value is the absolute length expressed in pixels.
526-
527- For <length-percentage> values, the computed value is one of the following:
528- * if the specified value contains only length units, the computed value is the absolute length
529- expressed in pixels.
530- * if the specified value contains only percentages, the computed value is a
531- simple percentage.
532- * otherwise, the computed value is a calc expression containing an absolute
533- length expressed in pixels, and a percentage value.
534-
535- For <color> values, the value is computed as described in
536- [[css-color-4#resolving-color-values]] .
537-
538- For <angle>, <time> and <resolution> values, the computed value is the
539- value expressed in its [=canonical unit=] , with ''calc()'' expressions
540- evaluated [[css-values-4#calc-computed-value|as described in CSS Values]] .
541-
542- For <custom-ident>, ident, or "*" values, the computed value is as specified.
543-
544- For <url> values, the computed value is one of the following:
545-
546- * if the URL is a relative URL, the computed value is the resolved absolute URL
547- as described in [[!css3-values]] .
548- * otherwise, the computed value is as specified.
549-
550- For <image> values, the computed value is as specified, except that relative
551- URLs that appear in the value are resolved to absolute URLs as described in
552- [[!css3-values]] , and all lengths are resolved to their computed values.
553-
554- For <integer>, <number> and <percentage> values, the computed value is
555- one of the following:
556-
557- * if the specified value is a ''calc()'' expression, the computed value is the
558- evaluated result of that expression.
559- * otherwise, the computed value is as specified.
560-
561- For <transform-function> values (including those contained in <transform-list> values),
562- the computed value is as specified but with all lengths resolved to their
563- computed values.
564-
565- For values specified by a syntax string that include "|" clauses, the computed
566- value is given by applying the calculation rules for the first clause that
567- matches to the specified value.
568-
569- For list values, the computed value is a list of the computed values of the
570- primitives in the list.
571-
572580
573581Registered Properties and @supports {#supports}
574582-----------------------------------------------
0 commit comments