mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Prefer serialize() to to_string() when serializing at-rules
This commit is contained in:
committed by
Sam Atkins
parent
bcc8e6ca60
commit
7335b90c40
Notes:
github-actions[bot]
2026-01-09 15:21:26 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/7335b90c40c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7397 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -80,11 +80,13 @@ String CSSPropertyRule::serialized() const
|
||||
builder.appendff("inherits: {}; ", inherits());
|
||||
|
||||
// 8. If the rule’s initial-value is present, follow these substeps:
|
||||
if (initial_value().has_value()) {
|
||||
if (m_initial_value) {
|
||||
// 1. The string "initial-value:".
|
||||
// 2. The result of performing serialize a CSS value in the rule’s initial-value followed by a single SEMICOLON
|
||||
// (U+003B), followed by a SPACE (U+0020).
|
||||
builder.appendff("initial-value: {}; ", initial_value());
|
||||
builder.append("initial-value: "sv);
|
||||
m_initial_value->serialize(builder, SerializationMode::Normal);
|
||||
builder.append("; "sv);
|
||||
}
|
||||
// 9. A single RIGHT CURLY BRACKET (U+007D).
|
||||
builder.append("}"sv);
|
||||
|
||||
Reference in New Issue
Block a user