mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:27:35 +00:00
LibWeb: Add helpers for adding margin box to flex item's content size
This commit is contained in:
parent
c2a1817c70
commit
b71f747453
1 changed files with 10 additions and 0 deletions
|
@ -61,6 +61,16 @@ private:
|
|||
DirectionAgnosticMargins padding {};
|
||||
bool is_min_violation { false };
|
||||
bool is_max_violation { false };
|
||||
|
||||
float add_main_margin_box_sizes(float content_size) const
|
||||
{
|
||||
return content_size + margins.main_before + margins.main_after + borders.main_before + borders.main_after + padding.main_before + padding.main_after;
|
||||
}
|
||||
|
||||
float add_cross_margin_box_sizes(float content_size) const
|
||||
{
|
||||
return content_size + margins.cross_before + margins.cross_after + borders.cross_before + borders.cross_after + padding.cross_before + padding.cross_after;
|
||||
}
|
||||
};
|
||||
|
||||
struct FlexLine {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue