ladybird/Tests/LibWeb/Layout/expected/vertical-align-middle-with-padding.txt
Jelle Raaijmakers 1e0013a3bc
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
LibWeb: Use margin box height for inline-block vertical alignment
For `vertical-align: middle` and `vertical-align: text-bottom`, we used
just the content height of the inline box to determine its alignment
position. This caused incorrect positioning when padding is applied.

This fixes the button alignment on our GitHub page.

Fixes #290.
2025-07-12 18:03:14 +02:00

39 lines
2.3 KiB
Text

Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x48 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x0 children: inline
BlockContainer <div.a> at (8,8) content-size 32x32 floating [BFC] children: not-inline
BlockContainer <div.b> at (9,9) content-size 30x30 children: inline
frag 0 from TextNode start: 0, length: 1, rect: [9,9 9.34375x18] baseline: 13.796875
"B"
TextNode <#text>
TextNode <#text>
BlockContainer <div.a> at (40,8) content-size 32.3125x40 floating [BFC] children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [51,19 10.3125x18] baseline: 24.296875
BlockContainer <span.ib.c> at (51,19) content-size 10.3125x18 inline-block [BFC] children: inline
frag 0 from TextNode start: 0, length: 1, rect: [51,19 10.3125x18] baseline: 13.796875
"C"
TextNode <#text>
TextNode <#text>
BlockContainer <div.a> at (72.3125,8) content-size 33.140625x40 floating [BFC] children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [83.3125,19 11.140625x18] baseline: 33.59375
BlockContainer <span.ib.d> at (83.3125,19) content-size 11.140625x18 inline-block [BFC] children: inline
frag 0 from TextNode start: 0, length: 1, rect: [83.3125,19 11.140625x18] baseline: 13.796875
"D"
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x48]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x0] overflow: [8,8 97.453125x40]
PaintableWithLines (BlockContainer<DIV>.a) [8,8 32x32]
PaintableWithLines (BlockContainer<DIV>.b) [8,8 32x32]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>.a) [40,8 32.3125x40]
PaintableWithLines (BlockContainer<SPAN>.ib.c) [40,8 32.3125x40]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>.a) [72.3125,8 33.140625x40]
PaintableWithLines (BlockContainer<SPAN>.ib.d) [72.3125,8 33.140625x40]
TextPaintable (TextNode<#text>)
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
SC for BlockContainer<HTML> [0,0 800x48] [children: 0] (z-index: auto)