diff options
author | bptato <nincsnevem662@gmail.com> | 2025-01-08 20:02:06 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2025-01-08 21:05:46 +0100 |
commit | ad85c1e84b32c15388ac7082cff14bc97e369f6b (patch) | |
tree | 1f73fce972e4779cb6177549602c07cc2282b7ce | |
parent | 5150542d96501420627df871ac84186967dbf857 (diff) | |
download | chawan-ad85c1e84b32c15388ac7082cff14bc97e369f6b.tar.gz |
layout: clear intrinsic minimum block size on shrink-to-fit relayout
starting to run out of test case names
-rw-r--r-- | src/css/layout.nim | 1 | ||||
-rw-r--r-- | test/layout/overflow-auto-in-nested-flex-with-shrink-to-fit.expected | 2 | ||||
-rw-r--r-- | test/layout/overflow-auto-in-nested-flex-with-shrink-to-fit.html | 10 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/css/layout.nim b/src/css/layout.nim index 992876db..19b054dc 100644 --- a/src/css/layout.nim +++ b/src/css/layout.nim @@ -2747,6 +2747,7 @@ proc initReLayout(state: var BlockState; bctx: var BlockContext; bctx.marginTarget = nil bctx.exclusions.setLen(state.oldExclusionsLen) state.offset = sizes.padding.topLeft + state.intr = size(w = 0, h = 0) box.applySize(sizes, state.maxChildWidth + state.totalFloatWidth, sizes.space, dtHorizontal) state.space.w = stretch(box.state.size.w) diff --git a/test/layout/overflow-auto-in-nested-flex-with-shrink-to-fit.expected b/test/layout/overflow-auto-in-nested-flex-with-shrink-to-fit.expected new file mode 100644 index 00000000..dec2cbe1 --- /dev/null +++ b/test/layout/overflow-auto-in-nested-flex-with-shrink-to-fit.expected @@ -0,0 +1,2 @@ +test +test diff --git a/test/layout/overflow-auto-in-nested-flex-with-shrink-to-fit.html b/test/layout/overflow-auto-in-nested-flex-with-shrink-to-fit.html new file mode 100644 index 00000000..38256559 --- /dev/null +++ b/test/layout/overflow-auto-in-nested-flex-with-shrink-to-fit.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<div style="display: flex"> +<div style="display: flex; flex-direction:column; max-width: 100%"> +<div style="overflow: auto"> +<div>test</div> +</div> +</div> +</div> + +test |