diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-12-28 20:35:17 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-12-28 20:35:17 +0100 |
| commit | 6a627ab38cabe0543d961a190b59dcfac622ce90 (patch) | |
| tree | 4c6ece1cbc1152002c3139618255b8b693b069aa /test | |
| parent | 9703f00237662f8eda685e9392bd97247b8074dd (diff) | |
| download | chawan-6a627ab38cabe0543d961a190b59dcfac622ce90.tar.gz | |
layout: fix various padding bugs
They need some peculiar conditions to manifest, but the logic errors
are clear:
* padding contributing to intrinsic minimum size wasn't being clamped
* inline padding was being applied twice
Diffstat (limited to 'test')
| -rw-r--r-- | test/layout/flex-no-shrink-padding-cancels-out-parent-margin.color.expected | 4 | ||||
| -rw-r--r-- | test/layout/flex-no-shrink-padding-cancels-out-parent-margin.html | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/layout/flex-no-shrink-padding-cancels-out-parent-margin.color.expected b/test/layout/flex-no-shrink-padding-cancels-out-parent-margin.color.expected new file mode 100644 index 00000000..de757ffa --- /dev/null +++ b/test/layout/flex-no-shrink-padding-cancels-out-parent-margin.color.expected @@ -0,0 +1,4 @@ +[48;2;255;0;0m aaaa aaaa[49m +[48;2;255;0;0mtest [49m +[48;2;0;0;255mtest [49m + diff --git a/test/layout/flex-no-shrink-padding-cancels-out-parent-margin.html b/test/layout/flex-no-shrink-padding-cancels-out-parent-margin.html new file mode 100644 index 00000000..d07af919 --- /dev/null +++ b/test/layout/flex-no-shrink-padding-cancels-out-parent-margin.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<style>* { font-family: monospace }</style> +<div style="background: red; width: 11ch"> +<div style="margin-left: -3ch"> +<div style="flex-shrink: 0; width: 100%; padding-left: 3ch"> +<div style="display: flex; flex-wrap: wrap"> +<div style="padding: 0 1ch">aaaa</div> +<div style="padding: 0 1ch">aaaa</div> +</div> +</div> +</div> +</div> + +<div style="width: 5ch; background: red"> +<div style="display: flex; margin: 0 -1ch"> +<div style="flex-basis: 100%; flex-shrink: 0; width: 100%; padding: 0 1ch; box-sizing: border-box"> +<div> +test +</div> +<div style="background: blue"> +test +</div> |