diff --git a/cssom-1/Overview.bs b/cssom-1/Overview.bs index f0fee38dc505..1a266b26d79a 100644 --- a/cssom-1/Overview.bs +++ b/cssom-1/Overview.bs @@ -1523,17 +1523,34 @@ To serialize a CSS rule, perform one of the following in accor
{{CSSStyleRule}}
- The result of concatenating the following: + Return the result of the following steps: +
    -
  1. The result of performing serialize a group of selectors on the rule's associated selectors. -
  2. The string " { ", i.e., a single SPACE (U+0020), followed by LEFT CURLY BRACKET (U+007B), - followed by a single SPACE (U+0020). -
  3. The result of performing serialize a CSS declaration block on the rule's associated declarations. -
  4. If the rule is associated with one or more declarations, the string " ", i.e., a single SPACE (U+0020). -
  5. The string "}", RIGHT CURLY BRACKET (U+007D). +
  6. Let |s| initially be + the result of performing serialize a group of selectors on the rule's associated selectors, + followed by the string " {", i.e., a single SPACE (U+0020), followed by LEFT CURLY BRACKET (U+007B). +
  7. Let |decls| be the result of performing serialize a CSS declaration block on the rule's associated declarations, or null if there are no such declarations. +
  8. Let |rules| be the result of performing [=serialize a CSS rule=] on each rule in the rule's {{CSSStyleRule/cssRules}} list, or null if there are no such rules. +
  9. If |decls| and |rules| are both null, append " }" to |s| (i.e. a single SPACE (U+0020) followed by RIGHT CURLY BRACKET (U+007D)) and return |s|. +
  10. If |rules| is null: +
      +
    1. Append a single SPACE (U+0020) to |s| +
    2. Append |decls| to |s| +
    3. Append " }" to |s| (i.e. a single SPACE (U+0020) followed by RIGHT CURLY BRACKET (U+007D)). +
    4. Return |s|. +
    +
  11. Otherwise: +
      +
    1. If |decls| is not null, prepend it to |rules|. +
    2. For each |rule| in |rules|: +
        +
      1. Append a newline followed by two spaces to |s|. +
      2. Append |rule| to |s|. +
      +
    3. Append a newline followed by RIGHT CURLY BRACKET (U+007D) to |s|. +
    4. Return |s|.
    -
    {{CSSImportRule}}
    The result of concatenating the following: