Skip to content

Commit ef44503

Browse files
darrnshntabatkins
authored andcommitted
Extend match concept to other style values (w3c#621)
1 parent 2519d4b commit ef44503

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

css-typed-om/Overview.bs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ probably in an appendix.
358358
and a [=string=] or {{CSSStyleValue}} |value|:
359359

360360
: If |value| is a {{CSSStyleValue}},
361-
:: If |value| does not match the grammar of a [=list-valued property iteration=] of |property|,
361+
:: If |value| does not [=match a CSS production|match the grammar=] of a [=list-valued property iteration=] of |property|,
362362
[=throw=] a {{TypeError}} and exit this algorithm.
363363
Otherwise, return the |value|.
364364

@@ -369,6 +369,18 @@ probably in an appendix.
369369
Note: This can throw a {{TypeError}} instead.
370370
</div>
371371

372+
<div algorithm>
373+
A {{CSSStyleValue}} is said to <dfn>match a CSS production</dfn>
374+
based on the following rules:
375+
376+
* A {{CSSKeywordValue}} always matches <<ident>>.
377+
* A {{CSSTransformValue}} always matches <<transform>>.
378+
* A {{CSSPositionValue}} always matches <<position>>.
379+
* A {{CSSNumericValue}} matches what its type [=CSSNumericValue/matches=].
380+
* A {{CSSURLImageValue}} always matches <<url>>.
381+
* Any subclass of {{CSSImageValue}} always matches <<image>>.
382+
</div>
383+
372384
<div algorithm>
373385
The <dfn method for="StylePropertyMapReadOnly, StylePropertyMap">get(|property|)</dfn> method,
374386
when called on a {{StylePropertyMap}} |this|,

0 commit comments

Comments
 (0)