aboutsummaryrefslogtreecommitdiffstats
path: root/src/css/box.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-12-17 01:23:52 +0100
committerbptato <nincsnevem662@gmail.com>2024-12-17 19:35:41 +0100
commit7d91d0dfe6309edeee7d7562d6054a8fb0392573 (patch)
treedede41714721d9ec6f4d7a61a66afb5b9fa7fe6b /src/css/box.nim
parentc514f8c8b2e11557eed512d55321f9c8382ac2cc (diff)
downloadchawan-7d91d0dfe6309edeee7d7562d6054a8fb0392573.tar.gz
layout: propagate intrinsic minimum height
Necessary for flex. Previously we just used the actual height, but that didn't account for boxes that size themselves depending on the available height (mainly just images for now). This also irons out intrinsic min width calculation somewhat, squashing several bugs. I hope it works well. It is a significant change in size calculation, so maybe there are still new bugs lurking.
Diffstat (limited to 'src/css/box.nim')
-rw-r--r--src/css/box.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/css/box.nim b/src/css/box.nim
index 3394d30d..856fd11c 100644
--- a/src/css/box.nim
+++ b/src/css/box.nim
@@ -34,8 +34,8 @@ type
size*: Size
# overflow relative to offset
overflow*: Overflow
- # minimum content width (usually shortest word)
- xminwidth*: LayoutUnit
+ # intrinsic minimum size (e.g. longest word)
+ intr*: Size
# baseline of the first line box of all descendants
firstBaseline*: LayoutUnit
# baseline of the last line box of all descendants