diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-01-03 23:25:25 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-01-03 23:25:25 +0100 |
| commit | 9f7289b063eb863523e5a0d4cbe7c707b48af225 (patch) | |
| tree | 33f4420ff44a956945ceaeb3de9c9f32f965c2f0 /src | |
| parent | e548f28c298abf5122d3f3af117b39f08e916d88 (diff) | |
| download | chawan-9f7289b063eb863523e5a0d4cbe7c707b48af225.tar.gz | |
layout: respect margin-top of root box
Diffstat (limited to 'src')
| -rw-r--r-- | src/css/layout.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/css/layout.nim b/src/css/layout.nim index ff982b57..3a6b3bf5 100644 --- a/src/css/layout.nim +++ b/src/css/layout.nim @@ -3428,7 +3428,7 @@ proc layout*(root: StyledNode; attrsp: ptr WindowAttributes): BlockBox = ctx.buildBlock() let sizes = lctx.resolveBlockSizes(space, box.computed) # the bottom margin is unused. - lctx.layoutRootBlock(box, offset(x = 0, y = 0), sizes) + lctx.layoutRootBlock(box, offset(x = 0, y = sizes.margin.top), sizes) var size = size(w = attrsp[].widthPx, h = attrsp[].heightPx) # Last absolute layer. lctx.popPositioned(size) |