mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Serialize custom properties in CSSStyleDeclaration::serialized()
Prior to this commit, PropertyOwningCSSStyleDeclaration::serialized() did not include custom properties, which lead to an incomplete `cssRule.cssText` result. This commit makes that class also serialize the custom properties and place them before the regular properties in the rule text.
This commit is contained in:
committed by
Sam Atkins
parent
f95ed9f373
commit
141143a1c6
Notes:
sideshowbarker
2024-07-17 03:45:48 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/141143a1c6 Pull-request: https://github.com/SerenityOS/serenity/pull/19331
@@ -0,0 +1,15 @@
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let styleNode = document.createElement("style");
|
||||
styleNode.innerText = `
|
||||
test {
|
||||
--color: red;
|
||||
color: red;
|
||||
}
|
||||
`;
|
||||
document.head.appendChild(styleNode);
|
||||
const sheet = styleNode.sheet;
|
||||
println(sheet.cssRules[0].cssText);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user