1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:17:35 +00:00

LibWeb: Set min-width for inline child boxes after inside layout

min-width for boxes with inline children can only be applied after
inside layout is done and width of box content is known.
This commit is contained in:
Aliaksandr Kalenik 2023-08-02 14:46:45 +03:00 committed by Andreas Kling
parent 50bf303edd
commit d32bf4cd41
3 changed files with 42 additions and 2 deletions

View file

@ -0,0 +1,9 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x76.578125 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 604x58.578125 children: not-inline
BlockContainer <div.outer> at (11,11) content-size 602x56.578125 children: not-inline
BlockContainer <div.inner> at (12,12) content-size 600x54.578125 children: inline
line 0 width: 426.875, height: 54.578125, bottom: 54.578125, baseline: 42.265625
frag 0 from TextNode start: 0, length: 18, rect: [12,12 426.875x54.578125]
"well hello friends"
TextNode <#text>

View file

@ -0,0 +1,12 @@
<!doctype html><style>
* {
border: 1px solid black !important;
}
body {
width: max-content;
}
.inner {
min-width: 600px;
font-size: 50px;
}
</style><body><div class="outer"><div class="inner">well hello friends