Skip to content
Merged
Changes from 1 commit
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
Next Next commit
[css-properties-values-api] Describe serialization of CSSPropertyRules
  • Loading branch information
andruud committed Feb 11, 2020
commit 7a5677c0e5f460945498c2b232f56f3926d93cba
27 changes: 27 additions & 0 deletions css-properties-values-api/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,33 @@ interface CSSPropertyRule : CSSRule {
which may not be present.
</dl>

<div algorithm>
To <dfn export>serialize a CSSPropertyRule rule</dfn>, return the concatenation of the following:

1. The string <code>"@property"</code> followed by a single SPACE (U+0020).
2. The result of performing <a>serialize an identifier</a> on the rule's
'name', followed by a single SPACE (U+0020).
3. The string <code>"{ "</code>, i.e., a single
LEFT CURLY BRACKET (U+007B), followed by a SPACE (U+0020).
4. The string <code>"syntax:"</code>, followed by a single SPACE (U+0020).
5. The result of performing <a>serialize a string</a> on the rule's
'syntax', followed by a single SEMICOLON (U+003B), followed by a SPACE (U+0020).
6. The string <code>"inherits:"</code>, followed by a single SPACE (U+0020).
7. For the rule's 'inherits' attribute, one of the following depending on
the attribute's value:
<dl class=switch>
: true
:: The string <code>"true"</code> followed by a single SEMICOLON (U+003B), followed by a SPACE (U+0020).
: false
:: The string <code>"false"</code> followed by a single SEMICOLON (U+003B), followed by a SPACE (U+0020).
</dl>
8. If the rule's 'initialValue' is present, follow these substeps:
1. The string <code>"initialValue:"</code> followed by a single SPACE (U+0020).
2. The result of performing <a>serialize a CSS value</a> in the rule's
'initialValue' followed by a single SEMICOLON (U+003B), followed by a SPACE (U+0020).
9. A single RIGHT CURLY BRACKET (U+007D).
</div>

{{CSSStyleValue}} Reification {#css-style-value-reification}
------------------------------------------------------------

Expand Down