mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Move width into LayoutStyle
This patch also adds the ability for Length to contain percentage values. This is a little off-spec, but will make storing and dealing with lengths a lot easier. To resolve a Length to a px-or-auto Length, there are now helpers for that. After calling them, you no longer have to think about em, rem, %, and such things.
This commit is contained in:
@@ -226,6 +226,7 @@ void LayoutNodeWithStyle::apply_style(const StyleProperties& specified_style)
|
||||
style.set_position(specified_style.position());
|
||||
style.set_text_align(specified_style.text_align());
|
||||
style.set_z_index(specified_style.z_index());
|
||||
style.set_width(specified_style.length_or_fallback(CSS::PropertyID::Width, {}));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user