Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions css-typed-om/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,9 @@ are represented by subclasses of the {{CSSNumericValue}} interface.
CSSNumericValue mul(CSSNumberish... values);
CSSNumericValue div(CSSNumberish... values);

CSSNumericValue min(CSSNumberish... values);
CSSNumericValue max(CSSNumberish... values);

boolean equals(CSSNumberish... value);

CSSNumericValue to(DOMString unit);
Expand Down Expand Up @@ -717,6 +720,52 @@ The following are the arithmetic operations you can perform on dimensions:
is set to |this|.
</div>

<div algorithm="CSSNumericValue.min()">
The <dfn for=CSSNumericValue method>min(...|values|)</dfn> method,
when called on a {{CSSNumericValue}} |this|,
must perform the following steps:

1. Replace each [=list/item=] of |values|
with the result of [=rectifying a numberish value=] for the [=list/item=].

2. If |this| is a {{CSSMathMin}} object,
[=list/prepend=] the [=list/items=] in |this|’s {{CSSMathMin/values}} internal slot
to |values|.
Otherwise,
prepend |this| to |values|.

3. Let |type| be the result of [=adding=] the [=types=] of every [=list/item=] in |values|.
If |type| is failure,
[=throw=] a {{TypeError}}.

4. Return a new {{CSSMathMin}} object
whose {{CSSMathMin/values}} internal slot
is set to |values|.
</div>

<div algorithm="CSSNumericValue.max()">
The <dfn for=CSSNumericValue method>max(...|values|)</dfn> method,
when called on a {{CSSNumericValue}} |this|,
must perform the following steps:

1. Replace each [=list/item=] of |values|
with the result of [=rectifying a numberish value=] for the [=list/item=].

2. If |this| is a {{CSSMathMax}} object,
[=list/prepend=] the [=list/items=] in |this|’s {{CSSMathMax/values}} internal slot
to |values|.
Otherwise,
prepend |this| to |values|.

3. Let |type| be the result of [=adding=] the [=types=] of every [=list/item=] in |values|.
If |type| is failure,
[=throw=] a {{TypeError}}.

4. Return a new {{CSSMathMax}} object
whose {{CSSMathMax/values}} internal slot
is set to |values|.
</div>

<div class=issue>
Define {{CSSNumericValue/equals()}}.
</div>
Expand Down