diff options
author | Enver Balalic <balalic.enver@gmail.com> | 2022-03-30 19:50:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-30 21:16:47 +0200 |
commit | 8b4d09932aa0a8476bd29a4da31cca051a1b2948 (patch) | |
tree | 0034ba64367c2cde01742deb5df0a951ac9cd6d2 /Base/res/html/misc | |
parent | 74d8e201eb7d325ca479fec1ca03e6ff93ca4892 (diff) | |
download | serenity-8b4d09932aa0a8476bd29a4da31cca051a1b2948.zip |
LibWeb: Fix sizing of flex child that has flex-basis 0
Before if an element didn't have a main min size we would clamp
it to a literal zero. If that element also had a flex-basis 0
it's width would end up being 0.
This patch adds a determine_min_main_size_of_child function that
will calculate the minimum main size for the box based on the
content of the box.
We use the result of that function now instead of clamping
the element main min size to 0.
This also adds one more box to the flex.html test page, which is
the same flex: 0 0 0 box but with flex-direction: column.
Diffstat (limited to 'Base/res/html/misc')
-rw-r--r-- | Base/res/html/misc/flex.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Base/res/html/misc/flex.html b/Base/res/html/misc/flex.html index a487eb1e16..3a6179215f 100644 --- a/Base/res/html/misc/flex.html +++ b/Base/res/html/misc/flex.html @@ -186,6 +186,12 @@ <div class="box" style="flex: 0 0 0;">2</div> <div class="box" style="flex: 0 0 0;">3</div> </div> + <p>flex: 0 0 0; flex-direction: column;</p> + <div class="my-container column" style="width: 500px;"> + <div class="box" style="flex: 0 0 0;">1</div> + <div class="box" style="flex: 0 0 0;">2</div> + <div class="box" style="flex: 0 0 0;">3</div> + </div> <p>flex: 1 2 0;</p> <div class="my-container" style="width: 500px;"> <div class="box" style="flex: 1 2 0;">1</div> |