mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Correctly handle properties on CSS declaration serialization
This commit is contained in:
Notes:
github-actions[bot]
2025-09-18 08:26:29 +00:00
Author: https://github.com/luizgfranca Commit: https://github.com/LadybirdBrowser/ladybird/commit/bcbbecff9f4 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5989 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user