Skip to content

Commit eec48b5

Browse files
committed
[css-values-4] Sync with L3
1 parent c73c695 commit eec48b5

File tree

1 file changed

+77
-24
lines changed

1 file changed

+77
-24
lines changed

css-values-4/Overview.bs

+77-24
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ Module Interactions</h3>
6868
<h2 id="value-defs">
6969
Value Definition Syntax</h2>
7070

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.
7375

7476
<h3 id="component-types">
75-
Component value types</h3>
77+
Component Value Types</h3>
7678

7779
Component value types are designated in several ways:
7880

@@ -84,6 +86,9 @@ Component value types</h3>
8486
<li>
8587
basic data types, which appear between <css>&lt;</css> and <css>></css>
8688
(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.
8792

8893
<li>
8994
types that have the same range of values as a property bearing the same name
@@ -169,7 +174,7 @@ Component value types</h3>
169174
''background: url(corner.png) no-repeat, inherit;'' is invalid.
170175

171176
<h3 id="component-combinators">
172-
Component value combinators</h3>
177+
Component Value Combinators</h3>
173178

174179
Component values can be arranged into property values as follows:
175180

@@ -205,7 +210,7 @@ Component value combinators</h3>
205210
</pre>
206211

207212
<h3 id="component-multipliers">
208-
Component value multipliers</h3>
213+
Component Value Multipliers</h3>
209214

210215
Every type, keyword, or bracketed group may be followed by one of
211216
the following modifiers:
@@ -286,7 +291,7 @@ Combinator and Multiplier Patterns</h3>
286291
while the "in order" possibilities are all variants on juxtaposition.
287292

288293
<h3 id="component-whitespace">
289-
Component values and white space</h3>
294+
Component Values and White Space</h3>
290295

291296
Unless otherwise specified,
292297
<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>
303308
to get this parsed as the two lengths ''1em'' and ''2em''.
304309

305310
<h3 id="value-examples">
306-
Property value examples</h3>
311+
Property Value Examples</h3>
307312

308313
Below are some examples of properties with their corresponding value
309314
definition fields
@@ -442,7 +447,9 @@ Combining Values: Interpolation, Addition, and Accumulation</h2>
442447
<h2 id="textual-values">
443448
Textual Data Types</h2>
444449

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>>).
446453
Aside from the casing of <a href="#keywords">pre-defined keywords</a>
447454
or as explicitly defined for a given property,
448455
no normalization is performed,
@@ -542,7 +549,7 @@ Author-defined Identifiers: the <<custom-ident>> type</h3>
542549
For example, the shorthand declaration ''animation: ease-in ease-out''
543550
is equivalent to the longhand declarations
544551
''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',
546553
leaving ''ease-out'' to be claimed by the <<custom-ident>> production belonging to 'animation-name'.
547554
</div>
548555

@@ -782,18 +789,60 @@ Numeric Data Types</h2>
782789
they represent the value’s abstract quantity,
783790
not its syntactic representation.
784791

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 &infin; or &minus;&infin; 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>[&minus;&infin;,&infin;]</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,&infin;]</code> range.)
840+
This does not make them any less binding.
789841

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.
793842
<!--
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>.
797846
-->
798847

799848
<!--
@@ -893,6 +942,10 @@ Numbers with Units: <a>dimension</a> values</h3>
893942
in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> [[!CSS3SYN]].
894943
Like keywords, unit identifiers are <a>ASCII case-insensitive</a>.
895944

945+
<wpt>
946+
css/css-values/angle-units-003.html
947+
</wpt>
948+
896949
CSS uses <<dimension>>s to specify
897950
distances (<<length>>),
898951
durations (<<time>>),
@@ -1089,7 +1142,7 @@ Distance Units: the <<length>> type</h2>
10891142
There are two types of length units: <a lt="relative length">relative</a> and <a lt="absolute length">absolute</a>.
10901143

10911144
<h3 id="relative-lengths">
1092-
Relative lengths</h3>
1145+
Relative Lengths</h3>
10931146

10941147
<dfn lt="relative length">Relative length units</dfn> specify a length relative to another length.
10951148
Style sheets that use relative units can more easily scale from one output environment to another.
@@ -1151,7 +1204,7 @@ Relative lengths</h3>
11511204
-->
11521205

11531206
<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>
11551208

11561209
The <dfn export id="font-relative-length">font-relative lengths</dfn>
11571210
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
13131366
-->
13141367

13151368
<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>
13171370

13181371
The <dfn export>viewport-percentage lengths</dfn> are relative to the size of the
13191372
<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
13771430
-->
13781431

13791432
<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>
13811434

13821435
The <dfn lt="absolute length">absolute length units</dfn> are fixed in relation to each other
13831436
and anchored to some physical measurement.
@@ -1430,7 +1483,7 @@ Absolute lengths: the ''cm'', ''mm'', ''Q'', ''in'', ''pt'', ''pc'', ''px'' unit
14301483
All of the absolute length units are <a>compatible</a>,
14311484
and ''px'' is their <a>canonical unit</a>.
14321485

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
14341487

14351488
<ol type=i>
14361489
<li>by relating the <a>physical units</a> to their physical measurements, or

0 commit comments

Comments
 (0)