@@ -411,7 +411,7 @@ Interpolated Property Values: the ''mix()'' notation</h3>
411
411
412
412
<pre class="prod">
413
413
<dfn><<mix()>></dfn> =
414
- mix( <<progress>> ';' <<declaration -value>> ? ';' <<declaration -value>> ? ) |
414
+ mix( <<progress>> ';' <<whole -value>> ';' <<whole -value>> ) |
415
415
mix( <<progress>> && of <<'animation-name'>> )
416
416
</pre>
417
417
@@ -475,12 +475,10 @@ Interpolated Property Values: the ''mix()'' notation</h3>
475
475
</pre>
476
476
</div>
477
477
478
- A ''mix()'' notation is invalid
479
- if it is not the sole value of the property;
480
- if either of its <<declaration-value>> s
481
- are invalid when specified as the entire value
482
- for the property the function is used in;
483
- or if the property using it is [=not animatable=] .
478
+ The ''mix()'' notation is a <<whole-value>> .
479
+ Additionally,
480
+ if any of its <<whole-value>> arguments are [=not animatable=] ,
481
+ the notation is invalid.
484
482
485
483
<div class="example">
486
484
For example, the following declarations are invalid,
@@ -501,6 +499,28 @@ Interpolated Property Values: the ''mix()'' notation</h3>
501
499
<h2 id="value-insert">
502
500
Miscellaneous Value Substituting Functions</h2>
503
501
502
+ <h3 id="whole-value" type lt="<whole-value>">
503
+ Representing An Entire Property Value: the <<whole-value>> type</h3>
504
+
505
+ Several functions defined in this specification
506
+ can only be used as the "whole value" of a property.
507
+ For example, ''background-position: toggle(50px 50px, center);'' is valid,
508
+ but ''background-position: toggle(50px, center) 50px;'' is not.
509
+ The <<whole-value>> production represents these values.
510
+
511
+ All properties implicitly accept a <<whole-value>>
512
+ as their entire value,
513
+ just as they accept the [=CSS-wide keywords=]
514
+ as their entire value.
515
+
516
+ When used as a component value of a function,
517
+ <<whole-value>> also represents any CSS value
518
+ normally valid as the whole value
519
+ of the property in which it is used
520
+ (including additional <<whole-value>> functions).
521
+ However, some functions may restrict
522
+ what a <<whole-value>> argument can include.
523
+
504
524
<!--
505
525
████████ ███████ ██████ ██████ ██ ████████ ███ ███
506
526
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
@@ -536,22 +556,16 @@ Toggling Between Values: ''toggle()''</h3>
536
556
537
557
The syntax of the ''toggle()'' expression is:
538
558
539
- <pre> toggle( <<toggle-value>> [ ';' <<toggle-value>> ] + )</pre>
540
-
541
- where <dfn><toggle-value></dfn> is any CSS value
542
- that is valid where the expression is placed.
543
- If any of the values inside are not valid,
544
- then the entire ''toggle()'' expression is invalid.
545
- The ''toggle()'' expression may be used as the value of any property,
546
- but must be the only component in that property's value.
559
+ <pre> toggle( <<whole-value>> [ ';' <<whole-value>> ] + )</pre>
547
560
548
561
Note: This [=functional notation=] uses semicolons to separate arguments
549
562
rather than the more typical comma
550
563
because the values themselves can contain commas.
551
564
552
- The ''toggle()'' notation is not allowed to be nested;
553
- nor may it contain ''attr()'' or ''calc()'' notations.
554
- Declarations containing such constructs are invalid.
565
+ The ''toggle()'' notation is a <<whole-value>> .
566
+ However, it is not allowed to be nested,
567
+ nor may it contain ''attr()'' or ''calc()'' notations;
568
+ declarations containing such constructs are invalid.
555
569
556
570
<div class="example">
557
571
The following ''toggle()'' examples are all invalid:
0 commit comments