mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +00:00
LibWeb: Add CSS::Percentage, PercentageOr and LengthPercentage types
Length and Percentage are different types, and sometimes only one or the other is allowed in a given CSS property. This is a first step towards separating them.
This commit is contained in:
parent
71ab8fb757
commit
01b57fa8b7
Notes:
sideshowbarker
2024-07-17 20:37:13 +09:00
Author: https://github.com/AtkinsSJ
Commit: 01b57fa8b7
Pull-request: https://github.com/SerenityOS/serenity/pull/12007
5 changed files with 158 additions and 2 deletions
|
@ -44,6 +44,7 @@ public:
|
|||
|
||||
static Length make_auto();
|
||||
static Length make_px(float value);
|
||||
Length percentage_of(Percentage const&) const;
|
||||
|
||||
Length resolved(const Length& fallback_for_undefined, const Layout::Node& layout_node, float reference_for_percent) const;
|
||||
Length resolved_or_auto(const Layout::Node& layout_node, float reference_for_percent) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue