Skip to content

Commit 2de5444

Browse files
committed
Add clause to normalize a '0' <<dimension>> to 0px.
Addresses #242
1 parent 24cc580 commit 2de5444

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

css-typed-om/Overview.bs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ They have a <dfn attribute for=CSSUnparsedValue>\[[tokens]]</dfn> internal slot,
389389
which is a [=list=] of alternating {{DOMString}} and {{CSSVariableReferenceValue}} objects.
390390
This list is the object's [=values to iterate over=].
391391

392-
The <dfn attribute for=CSSUnparsedValue>length</dfn> attribute indicates how many string fragments and variable references are contained within the {{UnparsedValue}}.
392+
The <dfn attribute for=CSSUnparsedValue>length</dfn> attribute indicates how many string fragments and variable references are contained within the {{CSSUnparsedValue}}.
393393

394394
The <dfn for=CSSUnparsedValue>indexed getter</dfn> retrieves the string fragment or variable reference at the provided index.
395395

@@ -1680,7 +1680,14 @@ CSS <<number>>, <<percentage>>, and <<dimension>> values become {{CSSUnitValue}}
16801680
[=normalize a calc() expression=] from |num|
16811681
and return the result.
16821682

1683-
2. Return a new {{CSSUnitValue}}
1683+
2. If |num| is the unitless value ''0'' and |num| is a <<dimension>>,
1684+
return a new {{CSSUnitValue}}
1685+
with its {{CSSUnitValue/value}} internal slot
1686+
set to 0,
1687+
and its {{CSSUnitValue/unit}} internal slot
1688+
set to "px".
1689+
1690+
3. Return a new {{CSSUnitValue}}
16841691
with its {{CSSUnitValue/value}} internal slot
16851692
set to the numeric value of |num|,
16861693
and its {{CSSUnitValue/unit}} internal slot

0 commit comments

Comments
 (0)