Skip to content

Commit deec884

Browse files
authored
[css-properties-values-api] Describe serialization of CSSPropert… (w3c#980)
* [css-properties-values-api] Describe serialization of CSSPropertyRules * Wrap * -rule
1 parent 000f69a commit deec884

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

css-properties-values-api/Overview.bs

+33
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,39 @@ interface CSSPropertyRule : CSSRule {
11551155
which may not be present.
11561156
</dl>
11571157

1158+
<div algorithm>
1159+
To <dfn export>serialize a CSSPropertyRule</dfn>, return the concatenation of
1160+
the following:
1161+
1162+
1. The string <code>"@property"</code> followed by a single SPACE (U+0020).
1163+
2. The result of performing <a>serialize an identifier</a> on the rule's
1164+
'name', followed by a single SPACE (U+0020).
1165+
3. The string <code>"{ "</code>, i.e., a single
1166+
LEFT CURLY BRACKET (U+007B), followed by a SPACE (U+0020).
1167+
4. The string <code>"syntax:"</code>, followed by a single SPACE (U+0020).
1168+
5. The result of performing <a>serialize a string</a> on the rule's
1169+
'syntax', followed by a single SEMICOLON (U+003B), followed by a
1170+
SPACE (U+0020).
1171+
6. The string <code>"inherits:"</code>, followed by a single SPACE (U+0020).
1172+
7. For the rule's 'inherits' attribute, one of the following depending on
1173+
the attribute's value:
1174+
<dl class=switch>
1175+
: true
1176+
:: The string <code>"true"</code> followed by a single
1177+
SEMICOLON (U+003B), followed by a SPACE (U+0020).
1178+
: false
1179+
:: The string <code>"false"</code> followed by a single
1180+
SEMICOLON (U+003B), followed by a SPACE (U+0020).
1181+
</dl>
1182+
8. If the rule's 'initialValue' is present, follow these substeps:
1183+
1. The string <code>"initialValue:"</code> followed by a single
1184+
SPACE (U+0020).
1185+
2. The result of performing <a>serialize a CSS value</a> in the rule's
1186+
'initialValue' followed by a single SEMICOLON (U+003B), followed by
1187+
a SPACE (U+0020).
1188+
9. A single RIGHT CURLY BRACKET (U+007D).
1189+
</div>
1190+
11581191
{{CSSStyleValue}} Reification {#css-style-value-reification}
11591192
------------------------------------------------------------
11601193

0 commit comments

Comments
 (0)