Skip to content

Commit 7434eda

Browse files
committed
[css-properties-values-api] Shift sections around a little and tweak heading nesting.
1 parent 21b2a6b commit 7434eda

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

css-properties-values-api/Overview.bs

+14-19
Original file line numberDiff line numberDiff line change
@@ -354,20 +354,8 @@ to full URLs as described in [[!css3-values]].
354354

355355
</div>
356356

357-
358-
Fallbacks In ''var()'' References {#fallbacks-in-var-references}
359-
----------------------------------------------------------------
360-
361-
References to registered custom properties using the ''var()'' function may
362-
provide a fallback. However, the fallback value must match the
363-
<a>syntax definition</a> of the custom property being referenced, otherwise the
364-
declaration is <a spec=css-variables>invalid at computed-value time</a>.
365-
366-
Note: This applies regardless of whether or not the fallback is being used.
367-
368-
369-
Substitution {#substitution}
370-
----------------------------
357+
Substitution via ''var()'' {#substitution}
358+
------------------------------------------
371359

372360
Like unregistered custom properties,
373361
the value of a registered custom property can be substituted into another value with the ''var()'' function.
@@ -396,12 +384,19 @@ and [[css-syntax-3#tokenization|tokenizing]] the resulting string.
396384
Because the computed value of '--x' (when serialized) is "80px",
397385
the computed value of '--y' is
398386
a <<dimension-token>> with a value of "80" and unit "px".
399-
400387
</div>
401388

389+
### Fallbacks In ''var()'' References ### {#fallbacks-in-var-references}
390+
391+
References to registered custom properties using the ''var()'' function may
392+
provide a fallback. However, the fallback value must match the
393+
<a>syntax definition</a> of the custom property being referenced, otherwise the
394+
declaration is <a spec=css-variables>invalid at computed-value time</a>.
395+
396+
Note: This applies regardless of whether or not the fallback is being used.
397+
402398

403-
Dependency Cycles Via Relative Units {#dependency-cycles}
404-
---------------------------------------------------------
399+
### Dependency Cycles via Relative Units ### {#dependency-cycles}
405400

406401
[=Registered custom properties=] follow the same rules for dependency cycle resolution
407402
as unregistered [=custom properties=],
@@ -586,8 +581,8 @@ If the above conditions are not met, the ''@property'' rule is invalid.
586581
██████ ██████
587582
-->
588583

589-
Registering Custom Properties {#registering-custom-properties}
590-
==============================================================
584+
Registering Custom Properties in JS {#registering-custom-properties}
585+
====================================================================
591586

592587
To register a custom property via JS,
593588
the {{CSS}} object is extended with a {{registerProperty()}} method:

0 commit comments

Comments
 (0)