@@ -68,11 +68,13 @@ Module Interactions</h3>
68
68
<h2 id="value-defs">
69
69
Value Definition Syntax</h2>
70
70
71
- The syntax described here is used to define the set of valid values
72
- for CSS properties. A property value can have one or more components.
71
+ The <dfn for=CSS export>value definition syntax</dfn> described here
72
+ is used to define the set of valid values for CSS properties
73
+ (and the valid syntax of many other parts of CSS).
74
+ A value so described can have one or more components.
73
75
74
76
<h3 id="component-types">
75
- Component value types </h3>
77
+ Component Value Types </h3>
76
78
77
79
Component value types are designated in several ways:
78
80
@@ -84,6 +86,9 @@ Component value types</h3>
84
86
<li>
85
87
basic data types, which appear between <css> <</css> and <css> ></css>
86
88
(e.g., <<length>> , <<percentage>> , etc.).
89
+ For <a>numeric data types</a> ,
90
+ this type notation can annotate any range restrictions
91
+ using the [[#numeric-ranges|bracketed range notation]] described below.
87
92
88
93
<li>
89
94
types that have the same range of values as a property bearing the same name
@@ -169,7 +174,7 @@ Component value types</h3>
169
174
''background: url(corner.png) no-repeat, inherit;'' is invalid.
170
175
171
176
<h3 id="component-combinators">
172
- Component value combinators </h3>
177
+ Component Value Combinators </h3>
173
178
174
179
Component values can be arranged into property values as follows:
175
180
@@ -205,7 +210,7 @@ Component value combinators</h3>
205
210
</pre>
206
211
207
212
<h3 id="component-multipliers">
208
- Component value multipliers </h3>
213
+ Component Value Multipliers </h3>
209
214
210
215
Every type, keyword, or bracketed group may be followed by one of
211
216
the following modifiers:
@@ -286,7 +291,7 @@ Combinator and Multiplier Patterns</h3>
286
291
while the "in order" possibilities are all variants on juxtaposition.
287
292
288
293
<h3 id="component-whitespace">
289
- Component values and white space </h3>
294
+ Component Values and White Space </h3>
290
295
291
296
Unless otherwise specified,
292
297
<a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a> and/or comments may appear before, after, and/or between
@@ -303,7 +308,7 @@ Component values and white space</h3>
303
308
to get this parsed as the two lengths ''1em'' and ''2em'' .
304
309
305
310
<h3 id="value-examples">
306
- Property value examples </h3>
311
+ Property Value Examples </h3>
307
312
308
313
Below are some examples of properties with their corresponding value
309
314
definition fields
@@ -442,7 +447,9 @@ Combining Values: Interpolation, Addition, and Accumulation</h2>
442
447
<h2 id="textual-values">
443
448
Textual Data Types</h2>
444
449
445
- Textual data types are used to represent identifiers or text.
450
+ The <dfn>textual data types</dfn> include
451
+ various keywords and identifiers
452
+ as well as strings (<<string>> ) and URLs (<<url>> ).
446
453
Aside from the casing of <a href="#keywords">pre-defined keywords</a>
447
454
or as explicitly defined for a given property,
448
455
no normalization is performed,
@@ -542,7 +549,7 @@ Author-defined Identifiers: the <<custom-ident>> type</h3>
542
549
For example, the shorthand declaration ''animation: ease-in ease-out''
543
550
is equivalent to the longhand declarations
544
551
''animation-timing-function: ease-in; animation-name: ease-out;'' .
545
- ''ease-in'' is claimed by the <<timing -function>> production belonging to 'animation-timing-function' ,
552
+ ''ease-in'' is claimed by the <<easing -function>> production belonging to 'animation-timing-function' ,
546
553
leaving ''ease-out'' to be claimed by the <<custom-ident>> production belonging to 'animation-name' .
547
554
</div>
548
555
@@ -782,18 +789,60 @@ Numeric Data Types</h2>
782
789
they represent the value’s abstract quantity,
783
790
not its syntactic representation.
784
791
785
- Properties may restrict numeric values to some range.
786
- If the value is outside the allowed range,
787
- unless otherwise specified,
788
- the declaration is invalid and must be <a href="https://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a> .
792
+ The <dfn>numeric data types</dfn> include
793
+ <<integer>> ,
794
+ <<number>> ,
795
+ <<percentage>> ,
796
+ and various <a>dimensions</a>
797
+ including <<length>> , <<angle>> , <<time>> , <<frequency>> , and <<resolution>> .
798
+
799
+ Note: While general-purpose <a>dimensions</a> are defined here,
800
+ some other modules define additional data types
801
+ (e.g. [[css-grid-1]] introduces ''fr'' units)
802
+ whose usage is more localized.
803
+
804
+ <h3 id="numeric-ranges">
805
+ Range Restrictions and Range Definition Notation</h3>
806
+
807
+ Properties can restrict numeric values to some range.
808
+ If the value is outside the allowed range,
809
+ then unless otherwise specified,
810
+ the declaration is invalid and must be <a href="https://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a> .
811
+ Range restrictions can be annotated in the numeric type notation
812
+ using <dfn local-lt="bracketed range notation">CSS bracketed range notation</dfn> --
813
+ <code> [<var>min</var>,<var>max</var>] </code> --
814
+ within the angle brackets, after the identifying keyword,
815
+ indicating a closed range
816
+ between (and including) <var> min</var> and <var> max</var> .
817
+ For example, <<integer [0,10]>> indicates an integer between ''0'' and ''10'' , inclusive.
818
+
819
+ Note: CSS values generally do not allow open ranges;
820
+ thus only square-bracket notation is used.
821
+
822
+ CSS theoretically supports infinite precision and infinite ranges for all value types;
823
+ however in reality implementations have finite capacity.
824
+ UAs should support reasonably useful ranges and precisions.
825
+ Range extremes that are ideally unlimited
826
+ are indicated using ∞ or −∞ as appropriate.
827
+
828
+ If no range is indicated,
829
+ either by using the <a>bracketed range notation</a>
830
+ or in the property description,
831
+ then <code> [−∞,∞] </code> is assumed.
832
+
833
+ Note: At the time of writing,
834
+ the <a>bracketed range notation</a> is new;
835
+ thus in most CSS specifications
836
+ any range limitations are described only in prose.
837
+ (For example, “Negative values are not allowed” or
838
+ “Negative values are invalid”
839
+ indicate a <code> [0,∞] </code> range.)
840
+ This does not make them any less binding.
789
841
790
- CSS theoretically supports infinite precision and infinite ranges for all value types;
791
- however in reality implementations have finite capacity.
792
- UAs should support reasonably useful ranges and precisions.
793
842
<!--
794
- The recommended minimum ranges and precision,
795
- and the required rounding and clamping rules,
796
- are given in <a href="#required-ranges">Appendix A</a> .
843
+ The recommended minimum ranges and precision,
844
+ and the required rounding and clamping rules,
845
+ are given in <a href="#required-ranges">Appendix A</a> .
797
846
-->
798
847
799
848
<!--
@@ -893,6 +942,10 @@ Numbers with Units: <a>dimension</a> values</h3>
893
942
in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> [[!CSS3SYN]] .
894
943
Like keywords, unit identifiers are <a>ASCII case-insensitive</a> .
895
944
945
+ <wpt>
946
+ css/css-values/angle-units-003.html
947
+ </wpt>
948
+
896
949
CSS uses <<dimension>> s to specify
897
950
distances (<<length>> ),
898
951
durations (<<time>> ),
@@ -1089,7 +1142,7 @@ Distance Units: the <<length>> type</h2>
1089
1142
There are two types of length units: <a lt="relative length">relative</a> and <a lt="absolute length">absolute</a> .
1090
1143
1091
1144
<h3 id="relative-lengths">
1092
- Relative lengths </h3>
1145
+ Relative Lengths </h3>
1093
1146
1094
1147
<dfn lt="relative length">Relative length units</dfn> specify a length relative to another length.
1095
1148
Style sheets that use relative units can more easily scale from one output environment to another.
@@ -1151,7 +1204,7 @@ Relative lengths</h3>
1151
1204
-->
1152
1205
1153
1206
<h4 id="font-relative-lengths">
1154
- Font-relative lengths : the ''em'', ''ex'', ''cap'', ''ch'', ''ic'', ''rem'', ''lh'', ''rlh'' units</h4>
1207
+ Font-relative Lengths : the ''em'', ''ex'', ''cap'', ''ch'', ''ic'', ''rem'', ''lh'', ''rlh'' units</h4>
1155
1208
1156
1209
The <dfn export id="font-relative-length">font-relative lengths</dfn>
1157
1210
refer to the font metrics of the element on which they are used--
@@ -1313,7 +1366,7 @@ Font-relative lengths: the ''em'', ''ex'', ''cap'', ''ch'', ''ic'', ''rem'', ''l
1313
1366
-->
1314
1367
1315
1368
<h4 id="viewport-relative-lengths">
1316
- Viewport-percentage lengths : the ''vw'', ''vh'', ''vi'', ''vb'', ''vmin'', ''vmax'' units</h4>
1369
+ Viewport-percentage Lengths : the ''vw'', ''vh'', ''vi'', ''vb'', ''vmin'', ''vmax'' units</h4>
1317
1370
1318
1371
The <dfn export>viewport-percentage lengths</dfn> are relative to the size of the
1319
1372
<a href="https://www.w3.org/TR/CSS21/visudet.html#containing-block-details">initial containing block</a> .
@@ -1377,7 +1430,7 @@ Viewport-percentage lengths: the ''vw'', ''vh'', ''vi'', ''vb'', ''vmin'', ''vma
1377
1430
-->
1378
1431
1379
1432
<h3 id="absolute-lengths">
1380
- Absolute lengths : the ''cm'', ''mm'', ''Q'', ''in'', ''pt'', ''pc'', ''px'' units</h3>
1433
+ Absolute Lengths : the ''cm'', ''mm'', ''Q'', ''in'', ''pt'', ''pc'', ''px'' units</h3>
1381
1434
1382
1435
The <dfn lt="absolute length">absolute length units</dfn> are fixed in relation to each other
1383
1436
and anchored to some physical measurement.
@@ -1430,7 +1483,7 @@ Absolute lengths: the ''cm'', ''mm'', ''Q'', ''in'', ''pt'', ''pc'', ''px'' unit
1430
1483
All of the absolute length units are <a>compatible</a> ,
1431
1484
and ''px'' is their <a>canonical unit</a> .
1432
1485
1433
- For a CSS device, these dimensions are <dfn export lt="anchor unit">anchored</dfn> either
1486
+ For a CSS device, these dimensions are <dfn lt="anchor unit | anchor ">anchored</dfn> either
1434
1487
1435
1488
<ol type=i>
1436
1489
<li> by relating the <a>physical units</a> to their physical measurements, or
0 commit comments