Files
serenity/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
Andreas Kling b0b5a056b3 LibWeb: Allow setting shorthand CSS properties via CSSStyleDeclaration
We now expand shorthands into their respective longhand values when
assigning to a shorthand named property on a CSSStyleDeclaration.

We also make sure that shorthands can be round-tripped by correctly
routing named property access through the getPropertyValue() AO,
and expanding it to handle shorthands as well.

A lot of WPT tests for CSS parsing rely on these mechanisms and should
now start working. :^)

Note that multi-level recursive shorthands like `border` don't work
100% correctly yet. We're going to need a bunch more logic to properly
serialize e.g `border-width` or `border` itself.

(cherry picked from commit e40ad73ae79023f64e250f854d0730c21e0f54fc)
2024-11-10 10:46:01 -05:00

22 KiB