From 04f22e4d935f80f3a412628bad2e0a70e3bf1c43 Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Tue, 7 Nov 2023 22:19:43 +0000 Subject: [PATCH] layout: consider display flex as block --- engine/layout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/layout.js b/engine/layout.js index 2c06c57..ef19ee2 100644 --- a/engine/layout.js +++ b/engine/layout.js @@ -486,7 +486,7 @@ export class LayoutNode extends Node { // if we have block children with width: auto, become block if (this.children.some(x => x.isBlock() && x.css().width === 'auto')) return true; - return this.display() === 'block' || this.display() === 'list-item'; + return this.display() === 'block' || this.display() === 'list-item' || this.display() === 'flex'; } isInline() { return !this.isBlock();