Skip to content

Commit

Permalink
layout: consider display flex as block
Browse files Browse the repository at this point in the history
  • Loading branch information
CanadaHonk committed Nov 7, 2023
1 parent 281743d commit 04f22e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 04f22e4

Please sign in to comment.