LibWeb: Support nested shorthands when serializing CSS declaration

This commit is contained in:
Callum Law 2025-06-03 20:11:45 +12:00 committed by Sam Atkins
parent 0a53aaa3b6
commit 048a0c9106
Notes: github-actions[bot] 2025-06-09 09:45:04 +00:00
5 changed files with 141 additions and 44 deletions

View file

@ -1,4 +1,4 @@
style.cssText = background-color: yellow; background-image: none; background-position: 0% 0%; background-size: auto auto; background-repeat: repeat; background-attachment: scroll; background-origin: padding-box; background-clip: border-box;
style.cssText = background: yellow;
style.length = 9
style[] =
1. background-color

View file

@ -2,13 +2,13 @@ Harness status: OK
Found 20 tests
7 Pass
13 Fail
13 Pass
7 Fail
Fail The serialization of border: 1px; border-top: 1px; should be canonical.
Fail The serialization of border: 1px solid red; should be canonical.
Fail The serialization of border: 1px red; should be canonical.
Fail The serialization of border: red; should be canonical.
Fail The serialization of border-top: 1px; border-right: 1px; border-bottom: 1px; border-left: 1px; border-image: none; should be canonical.
Pass The serialization of border: 1px solid red; should be canonical.
Pass The serialization of border: 1px red; should be canonical.
Pass The serialization of border: red; should be canonical.
Pass The serialization of border-top: 1px; border-right: 1px; border-bottom: 1px; border-left: 1px; border-image: none; should be canonical.
Fail The serialization of border-top: 1px; border-right: 1px; border-bottom: 1px; border-left: 1px; should be canonical.
Fail The serialization of border-top: 1px; border-right: 2px; border-bottom: 3px; border-left: 4px; should be canonical.
Fail The serialization of border: 1px; border-top: 2px; should be canonical.
@ -18,9 +18,9 @@ Fail The serialization of border: solid; border-style: dotted should be canonica
Pass The serialization of border-width: 1px; should be canonical.
Pass The serialization of overflow-x: scroll; overflow-y: hidden; should be canonical.
Pass The serialization of overflow-x: scroll; overflow-y: scroll; should be canonical.
Fail The serialization of outline-width: 2px; outline-style: dotted; outline-color: blue; should be canonical.
Pass The serialization of outline-width: 2px; outline-style: dotted; outline-color: blue; should be canonical.
Pass The serialization of margin-top: 1px; margin-right: 2px; margin-bottom: 3px; margin-left: 4px; should be canonical.
Fail The serialization of list-style-type: circle; list-style-position: inside; list-style-image: none; should be canonical.
Pass The serialization of list-style-type: circle; list-style-position: inside; list-style-image: none; should be canonical.
Pass The serialization of list-style-type: lower-alpha; should be canonical.
Pass The serialization of font-family: sans-serif; line-height: 2em; font-size: 3em; font-style: italic; font-weight: bold; should be canonical.
Pass The serialization of padding-top: 1px; padding-right: 2px; padding-bottom: 3px; padding-left: 4px; should be canonical.