Skip to content

Commit b6b1b24

Browse files
committed
[css-values] Specify that 0 parses as a <number> if it's ambiguous whether it's a <number> or <length>. Fixes #489.
1 parent f2b85b3 commit b6b1b24

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

css-values-3/Overview.bs

+5-1
Original file line numberDiff line numberDiff line change
@@ -848,8 +848,12 @@ Distance Units: the <<length>> type</h2>
848848
Lengths refer to distance measurements
849849
and are denoted by <dfn id="length-value">&lt;length></dfn> in the property definitions.
850850
A length is a <a>dimension</a>.
851-
However, for zero lengths the unit identifier is optional
851+
852+
For zero lengths the unit identifier is optional
852853
(i.e. can be syntactically represented as the <<number>> ''0'').
854+
However, if a ''0'' could be parsed as either a <<number>> or a <<length>> in a property
855+
(such as 'line-height'),
856+
it must parse as a <<number>>.
853857

854858
Properties may restrict the length value to some range.
855859
If the value is outside the allowed range,

css-values/Overview.bs

+5-1
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,12 @@ Distance Units: the <<length>> type</h2>
845845
Lengths refer to distance measurements
846846
and are denoted by <dfn id="length-value">&lt;length></dfn> in the property definitions.
847847
A length is a <a>dimension</a>.
848-
However, for zero lengths the unit identifier is optional
848+
849+
For zero lengths the unit identifier is optional
849850
(i.e. can be syntactically represented as the <<number>> ''0'').
851+
However, if a ''0'' could be parsed as either a <<number>> or a <<length>> in a property
852+
(such as 'line-height'),
853+
it must parse as a <<number>>.
850854

851855
Properties may restrict the length value to some range.
852856
If the value is outside the allowed range,

0 commit comments

Comments
 (0)