LibWeb: Correctly handle properties on CSS declaration serialization

This commit is contained in:
luizgfc 2025-08-24 11:18:44 -03:00 committed by Sam Atkins
commit bcbbecff9f
Notes: github-actions[bot] 2025-09-18 08:26:29 +00:00

View file

@ -238,7 +238,12 @@ String serialize_a_css_declaration(StringView property, StringView value, Import
StringBuilder builder;
// 2. Append property to s.
builder.append(property);
// AD-HOC: There's no place currently on the spec where the property name properly escaped,
// and this needs to be done when custom properties have special characters.
// Related spec issues:
// - https://github.com/w3c/csswg-drafts/issues/11729
// - https://github.com/w3c/csswg-drafts/issues/12258
serialize_an_identifier(builder, property);
// 3. Append ": " (U+003A U+0020) to s.
builder.append(": "sv);