Skip to content

Commit e919c9d

Browse files
committed
[css-values-3] Copy over note about unitless zero calc() from css-values-4
1 parent f7f942e commit e919c9d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

css-values-3/Overview.bs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,13 @@ Type Checking</h4>
15901590
(''cm'' is <<length>>, ''deg'' is <<angle>>, etc.).
15911591
An ''attr()'' expression's type is given by its <<type-or-unit>> argument.
15921592

1593+
Note: Because <<number-token>>s are always interpreted as <<number>>s or <<integer>>s,
1594+
"unitless 0" <<length>>s or <<angle>>s aren't supported in ''calc()''.
1595+
That is, ''width: calc(0 + 5px);'' is invalid,
1596+
even though both ''width: 0;''
1597+
and ''width: 5px;''
1598+
are valid.
1599+
15931600
If percentages are accepted in the context in which the expression is placed,
15941601
a <<percentage-token>> has the type of the value that percentages are relative to.
15951602
For example, in the 'width' property, percentages have the <<length>> type,

0 commit comments

Comments
 (0)