mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:37:36 +00:00
LibWeb: Resolve percentage padding and margins for grid items in GFC
Adds a second pass to resolve percentage paddings and margins of grid items after track sizes are known. If resolving percentage paddings or margins affects tracks sizes then second pass to re-resolve track sizes might also be needed but I cannot come up with an example to reproduce that so we can leave it to improve in the future :)
This commit is contained in:
parent
775742b35d
commit
1c979e0ed7
4 changed files with 68 additions and 18 deletions
|
@ -124,6 +124,8 @@ public:
|
|||
Box const& grid_container() const { return context_box(); }
|
||||
|
||||
private:
|
||||
void resolve_items_box_metrics(GridDimension const dimension);
|
||||
|
||||
CSSPixels m_automatic_content_height { 0 };
|
||||
bool is_auto_positioned_row(CSS::GridTrackPlacement const&, CSS::GridTrackPlacement const&) const;
|
||||
bool is_auto_positioned_column(CSS::GridTrackPlacement const&, CSS::GridTrackPlacement const&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue