// 2. 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.
autodecls=declaration().serialized();
// FIXME: 3. Let rules be the result of performing serialize a CSS rule on each rule in the rule’s cssRules list, or null if there are no such rules.
Stringrules;
// 4. 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.
if(decls.is_null()&&rules.is_null()){
builder.append(" }"sv);
returnbuilder.to_string();
}
// 5. If rules is null:
if(rules.is_null()){
// 1. Append a single SPACE (U+0020) to s
builder.append('');
// 2. Append decls to s
builder.append(decls);
// 3. Append " }" to s (i.e. a single SPACE (U+0020) followed by RIGHT CURLY BRACKET (U+007D)).
builder.append(" }"sv);
// 4. Return s.
returnbuilder.to_string();
}
// FIXME: 6. Otherwise:
// FIXME: 1. If decls is not null, prepend it to rules.
// FIXME: 2. For each rule in rules:
// FIXME: 1. Append a newline followed by two spaces to s.
// FIXME: 2. Append rule to s.
// FIXME: 3. Append a newline followed by RIGHT CURLY BRACKET (U+007D) to s.