mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +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:
parent
959464fce4
commit
ecacab8618
6 changed files with 53 additions and 29 deletions
|
@ -53,6 +53,8 @@ const char* Length::unit_name() const
|
|||
return "rem";
|
||||
case Type::Auto:
|
||||
return "auto";
|
||||
case Type::Percentage:
|
||||
return "percentage";
|
||||
case Type::Undefined:
|
||||
return "undefined";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue