LibWeb/CSS: Don't serialize longhands which match their initial values

Shorthand subproperties that match their initial values are now
excluded from serialization, by default.

Properties where this behavior is not desired, like `gap`, are
special-cased.
This commit is contained in:
Tim Ledbetter 2025-04-06 23:34:39 +01:00 committed by Sam Atkins
commit 3186adeaa1
Notes: github-actions[bot] 2025-04-07 10:40:16 +00:00
6 changed files with 144 additions and 27 deletions

View file

@ -0,0 +1,25 @@
Harness status: OK
Found 20 tests
20 Pass
Pass e.style['outline'] = "rgba(10, 20, 30, 0.4)" should set the property value
Pass e.style['outline'] = "auto" should set the property value
Pass e.style['outline'] = "none" should set the property value
Pass e.style['outline'] = "dotted" should set the property value
Pass e.style['outline'] = "dashed" should set the property value
Pass e.style['outline'] = "solid" should set the property value
Pass e.style['outline'] = "double" should set the property value
Pass e.style['outline'] = "groove" should set the property value
Pass e.style['outline'] = "ridge" should set the property value
Pass e.style['outline'] = "inset" should set the property value
Pass e.style['outline'] = "outset" should set the property value
Pass e.style['outline'] = "0" should set the property value
Pass e.style['outline'] = "1px" should set the property value
Pass e.style['outline'] = "calc(2em + 3ex)" should set the property value
Pass e.style['outline'] = "thin" should set the property value
Pass e.style['outline'] = "medium" should set the property value
Pass e.style['outline'] = "thick" should set the property value
Pass e.style['outline'] = "dashed thin" should set the property value
Pass e.style['outline'] = "medium rgba(10, 20, 30, 0.4)" should set the property value
Pass e.style['outline'] = "3px ridge rgba(10, 20, 30, 0.4)" should set the property value