mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
LibWeb: Support shorthands when setting style attribute
Better support for CSS shorthands when setting the style attribute. This improves some tests in WPT /css/css-align/default-alignment/*shorthand. When setting the style attribute in JS via element.style = '..' or the setAttribute method, shorthand properties were not expanded to longhand properties.
This commit is contained in:
parent
99c66f49fb
commit
2199fde5a9
Notes:
github-actions[bot]
2024-10-31 12:23:58 +00:00
Author: https://github.com/sazarkin 🔰
Commit: 2199fde5a9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1894
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 130 additions and 1 deletions
12
Tests/LibWeb/Text/expected/HTML/background-shorthand.txt
Normal file
12
Tests/LibWeb/Text/expected/HTML/background-shorthand.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
style.cssText = background-color: rgb(255, 255, 0); background-image: none; background-position-x: left 0%; background-position-y: top 0%; background-size: auto auto; background-repeat: repeat repeat; background-attachment: scroll; background-origin: padding-box; background-clip: border-box;
|
||||
style.length = 9
|
||||
style[] =
|
||||
1. background-color
|
||||
2. background-image
|
||||
3. background-position-x
|
||||
4. background-position-y
|
||||
5. background-size
|
||||
6. background-repeat
|
||||
7. background-attachment
|
||||
8. background-origin
|
||||
9. background-clip
|
48
Tests/LibWeb/Text/expected/HTML/place-items-shorthand.txt
Normal file
48
Tests/LibWeb/Text/expected/HTML/place-items-shorthand.txt
Normal file
|
@ -0,0 +1,48 @@
|
|||
=== place-items: normal
|
||||
place-items: normal normal
|
||||
align-items: normal
|
||||
justify-items: normal
|
||||
=== place-items: stretch
|
||||
place-items: stretch stretch
|
||||
align-items: stretch
|
||||
justify-items: stretch
|
||||
=== place-items: start
|
||||
place-items: start start
|
||||
align-items: start
|
||||
justify-items: start
|
||||
=== place-items: end
|
||||
place-items: end end
|
||||
align-items: end
|
||||
justify-items: end
|
||||
=== place-items: self-start
|
||||
place-items: self-start self-start
|
||||
align-items: self-start
|
||||
justify-items: self-start
|
||||
=== place-items: self-end
|
||||
place-items: self-end self-end
|
||||
align-items: self-end
|
||||
justify-items: self-end
|
||||
=== place-items: center
|
||||
place-items: center center
|
||||
align-items: center
|
||||
justify-items: center
|
||||
=== place-items: flex-start
|
||||
place-items: flex-start flex-start
|
||||
align-items: flex-start
|
||||
justify-items: flex-start
|
||||
=== place-items: flex-end
|
||||
place-items: flex-end flex-end
|
||||
align-items: flex-end
|
||||
justify-items: flex-end
|
||||
=== place-items: baseline
|
||||
place-items: baseline baseline
|
||||
align-items: baseline
|
||||
justify-items: baseline
|
||||
=== place-items: normal start
|
||||
place-items: normal start
|
||||
align-items: normal
|
||||
justify-items: start
|
||||
=== place-items: normal center
|
||||
place-items: normal center
|
||||
align-items: normal
|
||||
justify-items: center
|
Loading…
Add table
Add a link
Reference in a new issue