diff options
-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 |