From 782ebcea2a1df040f34603e77b8d8588ba7ebbf1 Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 8 Dec 2024 17:30:32 +0100 Subject: layout: another xminwidth kludge yeah idk --- src/css/layout.nim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/css') diff --git a/src/css/layout.nim b/src/css/layout.nim index d0a19250..58078d73 100644 --- a/src/css/layout.nim +++ b/src/css/layout.nim @@ -1212,6 +1212,10 @@ proc applyMinWidth(box: BlockBox; sizes: ResolvedSizes) = # (or maybe I could just change DefaultSpan to start from # LayoutUnit.low? then I'll need another extra 0 check everywhere I # apply it but that should be ok) + # Also I have doubts on whether checking for stretch is OK... why + # isn't it reflected by minWidth anyway? + if sizes.space.w.t == scStretch: + box.state.xminwidth = min(box.state.xminwidth, sizes.space.w.u) if sizes.minWidth > 0: box.state.xminwidth = min(box.state.xminwidth, sizes.minWidth) -- cgit