Skip to content

Commit 7965e6c

Browse files
committed
[css-values-4] Clarify allowed/required units in bracket-range notation. #7572
1 parent b1b4520 commit 7965e6c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

css-values-4/Overview.bs

+9-1
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,9 @@ Range Restrictions and Range Definition Notation</h3>
10961096
within the angle brackets, after the identifying keyword,
10971097
indicating a closed range
10981098
between (and including) <var>min</var> and <var>max</var>.
1099-
For example, <<integer [0,10]>> indicates an integer between ''0'' and ''10'', inclusive.
1099+
For example, <<integer [0,10]>> indicates an integer between ''0'' and ''10'', inclusive,
1100+
while <<length [0, 100px]>> indicates a length between ''0px'' and ''100px''
1101+
(expressed in any unit).
11001102

11011103
Note: CSS values generally do not allow open ranges;
11021104
thus only square-bracket notation is used.
@@ -1113,6 +1115,12 @@ Range Restrictions and Range Definition Notation</h3>
11131115
or in the property description,
11141116
then <code>[&minus;&infin;,&infin;]</code> is assumed.
11151117

1118+
Values of &minus;&infin; or &infin; must be written without units,
1119+
even if the value type uses units.
1120+
Values of ''0'' <em>can</em> be written without units,
1121+
even if the value type doesn't allow "unitless zeroes"
1122+
(such as <<time>>).
1123+
11161124
Note: At the time of writing,
11171125
the <a>bracketed range notation</a> is new;
11181126
thus in most CSS specifications

0 commit comments

Comments
 (0)