You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
or else a value whose meaning has no connection to the variable.)
410
410
411
-
</p><p> The <var><fallback></var> value is identical to the syntax of a <adata-autolink="link" href="#custom-property">custom property</a> value.
411
+
</p><p> The <adata-autolink="link" class="production"><var><fallback></var></a> value is identical to the syntax of a <adata-autolink="link" href="#custom-property">custom property</a> value:
412
+
it accepts anything allowed by the core syntax of CSS
413
+
(except that, since it's a value in a function rather than a value in a declaration,
414
+
some tokens that were allowed in a <adata-autolink="link" href="#custom-property">custom property</a> don't work in a <adata-autolink="link" class="production"><var><fallback></var></a> and vice versa,
415
+
because they'd close the function early).
416
+
417
+
</p><pclass="note"> Note: The syntax of <adata-autolink="link" class="production"><var><fallback></var></a>, like that of <adata-autolink="link" href="#custom-property">custom properties</a>, allows commas.
418
+
For example, a variable use like <adata-autolink="maybe" class="css">var(foo, red, blue)</a> defines a fallback of <adata-autolink="maybe" class="css">red, blue</a>;
419
+
that is, anything between the first comma and the end of the function is considered a <adata-autolink="link" class="production"><var><fallback></var></a> value.
412
420
413
421
</p><p> If the variable named by the first argument is valid,
414
422
the variable's value is substituted as normal.
415
423
If the variable is invalid,
416
-
and a <var><fallback></var> was provided,
417
-
the <var><fallback></var> is substituted instead.
424
+
and a <adata-autolink="link" class="production"><var><fallback></var></a> was provided,
425
+
the <adata-autolink="link" class="production"><var><fallback></var></a> is substituted instead.
418
426
Otherwise, the result of evaluating the <adata-autolink="maybe" class="css">var()</a> function will mean
419
427
that the containing declaration is invalid at computed-value time.
0 commit comments