diff options
-rw-r--r-- | src/layout/engine.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim index ac164ff3..9f4f8cb1 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -623,12 +623,12 @@ func toPercSize(sc: SizeConstraint): Option[LayoutUnit] = return none(LayoutUnit) func getParentWidth(box, parent: BlockBox): SizeConstraint = - if box.positioned: + if box.computed{"position"} == POSITION_ABSOLUTE: return parent.viewport.positioned[^1].availableWidth return parent.availableWidth func getParentHeight(box, parent: BlockBox): SizeConstraint = - if box.positioned: + if box.computed{"position"} == POSITION_ABSOLUTE: return parent.viewport.positioned[^1].availableHeight return parent.availableHeight |