mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Start fleshing out support for relative CSS units
This patch introduces support for more than just "absolute px" units in our Length class. It now also supports "em" and "rem", which are units relative to the font-size of the current layout node and the <html> element's layout node respectively.
This commit is contained in:
@@ -190,7 +190,7 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
|
||||
if (auto value = parse_line_style(parts[0])) {
|
||||
set_property_border_style(style, value.release_nonnull());
|
||||
set_property_border_color(style, ColorStyleValue::create(Gfx::Color::Black));
|
||||
set_property_border_width(style, LengthStyleValue::create(Length(3, Length::Type::Absolute)));
|
||||
set_property_border_width(style, LengthStyleValue::create(Length(3, Length::Type::Px)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user