mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
LibWeb: Properly handle auto
in StyleProperties::length_percentage()
This relied on `auto` being a LengthStyleValue, which soon will not be true. :^)
This commit is contained in:
parent
22cb74d9ff
commit
6bf5371124
1 changed files with 3 additions and 0 deletions
|
@ -114,6 +114,9 @@ Optional<LengthPercentage> StyleProperties::length_percentage(CSS::PropertyID id
|
|||
if (value->has_length())
|
||||
return value->to_length();
|
||||
|
||||
if (value->has_auto())
|
||||
return LengthPercentage { Length::make_auto() };
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue