Skip to content

Commit

Permalink
[css-properties-values-api] Describe serialization of CSSPropert… (#980)
Browse files Browse the repository at this point in the history
* [css-properties-values-api] Describe serialization of CSSPropertyRules

* Wrap

* -rule
  • Loading branch information
andruud authored Mar 3, 2020
1 parent 000f69a commit deec884
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions css-properties-values-api/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,39 @@ interface CSSPropertyRule : CSSRule {
which may not be present.
</dl>

<div algorithm>
To <dfn export>serialize a CSSPropertyRule</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

0 comments on commit deec884

Please sign in to comment.