about summary refs log tree commit diff stats
path: root/src/layout/box.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-19 19:51:45 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-19 19:57:09 +0200
commit485fff96292f737879c92973ca3c06755f95ffdf (patch)
tree531b925f48dc5666573aa3a52bd597f5c911c169 /src/layout/box.nim
parentd4d34ea8b5257d6f0ddd40807a9b6b684df24811 (diff)
downloadchawan-485fff96292f737879c92973ca3c06755f95ffdf.tar.gz
layout: float sizing fixes
Turns out our shrink-to-fit emulation was inadequate: it assumed all
floats are positioned on a separate line, which is the *opposite* of
what we want, as that would be the behavior of min-content.

Now we instead sum together the width of all floats and the widest
non-floating child, and then clamp that to the target fitContent width.
This correctly gives us max-content width in the first pass, still
without having to actually position the floats.
Diffstat (limited to 'src/layout/box.nim')
0 files changed, 0 insertions, 0 deletions