1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 02:54:59 +00:00

LibWeb: Move the offset, margin and padding boxes into LayoutStyle

This commit is contained in:
Andreas Kling 2020-06-24 17:45:42 +02:00
parent 6b334e02e6
commit 4b2ac34725
9 changed files with 66 additions and 79 deletions

View file

@ -266,7 +266,7 @@ NonnullRefPtr<StyleValue> parse_css_value(const StringView& string)
auto number = parse_number(string);
if (number.has_value()) {
if (string.ends_with('%'))
return PercentageStyleValue::create(number.value());
return LengthStyleValue::create(Length(number.value(), Length::Type::Percentage));
if (string.ends_with("em"))
return LengthStyleValue::create(Length(number.value(), Length::Type::Em));
if (string.ends_with("rem"))