mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 22:57:34 +00:00
LibWeb: Honor column-gap and row-gap CSS properties in flex layout
This isn't actually part of CSS-FLEXBOX-1, but all major engines honor these properties in flex layout, and it's widely used on the web. There's a bug open against the flexbox spec where fantasai says the algorithm will be updated in CSS-FLEXBOX-2: https://github.com/w3c/csswg-drafts/issues/2336 I've added comments to all the places where we adjust calculations for gaps with "CSS-FLEXBOX-2" so we can find them easily. When that spec becomes available, we can add proper spec links.
This commit is contained in:
parent
7dd3c4a79c
commit
47c21cc349
4 changed files with 66 additions and 1 deletions
|
@ -112,6 +112,8 @@ private:
|
|||
float sum_of_scaled_flex_shrink_factor_of_unfrozen_items() const;
|
||||
};
|
||||
|
||||
CSSPixels main_gap() const;
|
||||
CSSPixels cross_gap() const;
|
||||
bool has_definite_main_size(Box const&) const;
|
||||
bool has_definite_cross_size(Box const&) const;
|
||||
CSSPixels inner_main_size(Box const&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue