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
Notes: sideshowbarker 2024-07-19 05:24:23 +09:00
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"))