Skip to content

Commit ed75550

Browse files
committed
WIP: CSSBoxWidget - Render heights correctly
1 parent bcee9b3 commit ed75550

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

lib/src/css_box_widget.dart

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,17 @@ class _RenderCSSBox extends RenderBox
453453
: containingBlockSize.width -
454454
(this.margins.left?.value ?? 0) -
455455
(this.margins.right?.value ?? 0),
456-
maxHeight: containingBlockSize.height -
457-
(this.margins.top?.value ?? 0) -
458-
(this.margins.bottom?.value ?? 0),
459-
minWidth: 0,
460-
minHeight: 0,
456+
maxHeight: (this.height.unit != Unit.auto)
457+
? this.height.value
458+
: containingBlockSize.height -
459+
(this.margins.top?.value ?? 0) -
460+
(this.margins.bottom?.value ?? 0),
461+
minWidth: (this.width.unit != Unit.auto)
462+
? this.width.value
463+
: 0,
464+
minHeight: (this.height.unit != Unit.auto)
465+
? this.height.value
466+
: 0,
461467
);
462468
final Size childSize = layoutChild(child!, childConstraints);
463469

0 commit comments

Comments
 (0)