about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-12-08 17:30:32 +0100
committerbptato <nincsnevem662@gmail.com>2024-12-08 17:30:34 +0100
commit782ebcea2a1df040f34603e77b8d8588ba7ebbf1 (patch)
treee576017a38290b6855c36afd41d4ef9830c8ad0e /src
parent8c0efdda8b3a68e2de60e3333adde5beb90a8dd8 (diff)
downloadchawan-782ebcea2a1df040f34603e77b8d8588ba7ebbf1.tar.gz
layout: another xminwidth kludge
yeah idk
Diffstat (limited to 'src')
-rw-r--r--src/css/layout.nim4
1 files changed, 4 insertions, 0 deletions
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)