mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
LibWeb: Change implicit background-size height to auto
The spec says: "The first value gives the width of the corresponding image, the second value its height. If only one value is given the second is assumed to be auto." Fixes #18782
This commit is contained in:
parent
719f1db6c9
commit
42bfe5db5f
1 changed files with 2 additions and 1 deletions
|
@ -4606,12 +4606,13 @@ ErrorOr<RefPtr<StyleValue>> Parser::parse_single_background_size_value(TokenStre
|
|||
|
||||
auto maybe_y_value = TRY(parse_css_value(tokens.peek_token()));
|
||||
if (!maybe_y_value || !property_accepts_value(PropertyID::BackgroundSize, *maybe_y_value)) {
|
||||
auto y_value = LengthPercentage { Length::make_auto() };
|
||||
auto x_size = get_length_percentage(*x_value);
|
||||
if (!x_size.has_value())
|
||||
return nullptr;
|
||||
|
||||
transaction.commit();
|
||||
return BackgroundSizeStyleValue::create(x_size.value(), x_size.value());
|
||||
return BackgroundSizeStyleValue::create(x_size.value(), y_value);
|
||||
}
|
||||
tokens.next_token();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue