diff options
author | bptato <nincsnevem662@gmail.com> | 2024-11-09 16:19:28 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-11-09 16:34:34 +0100 |
commit | 63abe1308be087f0658186a303fe9e6843d2166a (patch) | |
tree | 2a366d370e43fe85fc422a125c464fdbfee9925d /test/layout | |
parent | 074d86a867c20d6e9daf164e5d03a81cf7ecb2b4 (diff) | |
download | chawan-63abe1308be087f0658186a303fe9e6843d2166a.tar.gz |
layout: fix a few more flex sizing bugs
* fix min-width, max-width, etc. not being accounted for properly on the main axis * fix fit-content sizing being overridden for flex items * fix baseline not being set * somewhat unrelated: fix firstBaseline not being set for block boxes
Diffstat (limited to 'test/layout')
-rw-r--r-- | test/layout/flex-min-max-sizes.color.expected | 12 | ||||
-rw-r--r-- | test/layout/flex-min-max-sizes.html | 14 | ||||
-rw-r--r-- | test/layout/inline-flex-grow-item.color.expected | 2 | ||||
-rw-r--r-- | test/layout/inline-flex-grow-item.html | 6 |
4 files changed, 34 insertions, 0 deletions
diff --git a/test/layout/flex-min-max-sizes.color.expected b/test/layout/flex-min-max-sizes.color.expected new file mode 100644 index 00000000..ae3ee9a3 --- /dev/null +++ b/test/layout/flex-min-max-sizes.color.expected @@ -0,0 +1,12 @@ +[38;2;130;130;130m[48;2;240;248;255mtest [39m[49m +[38;2;130;130;130m[48;2;240;248;255mtest [39m[49m +[38;2;130;130;130m[48;2;240;248;255m [39m[49m +[38;2;130;130;130m[48;2;240;248;255m [39m[49m +[38;2;130;130;130m[48;2;240;248;255m [39m[49m +[38;2;130;130;130m[48;2;240;248;255m [39m[49m +[38;2;130;130;130m[48;2;240;248;255mtest [39m[49m +[38;2;130;130;130m[48;2;240;248;255m [39m[49m +[38;2;130;130;130m[48;2;240;248;255m [39m[49m +[38;2;130;130;130m[48;2;240;248;255m [39m[49m +[38;2;130;130;130m[48;2;240;248;255m [39m[49m + diff --git a/test/layout/flex-min-max-sizes.html b/test/layout/flex-min-max-sizes.html new file mode 100644 index 00000000..c603191f --- /dev/null +++ b/test/layout/flex-min-max-sizes.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<div class="container" style="display: flex; max-height: 40em; background: aliceblue"> +test +</div> +<div style="background: red; max-height: 500em; display: flex; min-height: 5em; flex-direction: column"> +<div style="background: aliceblue; flex-grow: 1"> +test +</div> +</div> +<div style="background: red; display: flex; min-height: 5em; flex-direction: column"> +<div style="background: aliceblue; max-height: 500em; flex-grow: 1"> +test +</div> +</div> diff --git a/test/layout/inline-flex-grow-item.color.expected b/test/layout/inline-flex-grow-item.color.expected new file mode 100644 index 00000000..d4f36598 --- /dev/null +++ b/test/layout/inline-flex-grow-item.color.expected @@ -0,0 +1,2 @@ +[48;2;0;128;0mtest[49m + diff --git a/test/layout/inline-flex-grow-item.html b/test/layout/inline-flex-grow-item.html new file mode 100644 index 00000000..15887a4e --- /dev/null +++ b/test/layout/inline-flex-grow-item.html @@ -0,0 +1,6 @@ +<div style="width: 20ch"> +<div style="display: inline-flex"> +<div style="background: green; flex-grow: 1"> +test +</div> +</div> |