mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Handle CSS-wide keywords in style_property_for_sided_shorthand
CSS-wide keywords should not be concatenated in the same way as other values unless they are all the same.
This commit is contained in:
parent
62da650992
commit
7d81823eb3
Notes:
github-actions[bot]
2025-06-16 11:38:51 +00:00
Author: https://github.com/Calme1709
Commit: 7d81823eb3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5066
Reviewed-by: https://github.com/AtkinsSJ ✅
2 changed files with 6 additions and 3 deletions
|
@ -479,6 +479,9 @@ static Optional<StyleProperty> style_property_for_sided_shorthand(PropertyID pro
|
|||
bool const top_and_bottom_same = top_value == bottom_value;
|
||||
bool const left_and_right_same = left_value == right_value;
|
||||
|
||||
if ((top_value->is_css_wide_keyword() || right_value->is_css_wide_keyword() || bottom_value->is_css_wide_keyword() || left_value->is_css_wide_keyword()) && (!top_and_bottom_same || !left_and_right_same || top_value != left_value))
|
||||
return {};
|
||||
|
||||
RefPtr<CSSStyleValue const> value;
|
||||
|
||||
if (top_and_bottom_same && left_and_right_same && top_value == left_value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue