mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
LibWeb: Use flex layout for button content alignment
Using flex layout inside button solves the issue with wrongly calculated height when it has: pseudo element and whitespaces inside. Also using flex instead of a table layout allows for the same vertical alignment but with fewer layout nodes: a flex container and anonymous wrapper for content instead of a table wrapper, table, row, and cell.
This commit is contained in:
parent
3216cc34a6
commit
ed0dc2ff72
11 changed files with 145 additions and 147 deletions
|
@ -0,0 +1,19 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x58 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x42 children: inline
|
||||
line 0 width: 42, height: 42, bottom: 42, baseline: 42
|
||||
frag 0 from BlockContainer start: 0, length: 0, rect: [29,29 0x0]
|
||||
BlockContainer <button> at (29,29) content-size 0x0 positioned inline-block [BFC] children: not-inline
|
||||
BlockContainer <(anonymous)> at (29,29) content-size 0x0 flex-container(column) [FFC] children: not-inline
|
||||
BlockContainer <(anonymous)> at (29,29) content-size 0x0 flex-item [BFC] children: not-inline
|
||||
BlockContainer <(anonymous)> at (9,9) content-size 40x40 positioned [BFC] children: inline
|
||||
TextNode <#text>
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x58]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x42]
|
||||
PaintableWithLines (BlockContainer<BUTTON>) [8,8 42x42]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [29,29 0x0] overflow: [9,9 40x40]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [29,29 0x0] overflow: [9,9 40x40]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [9,9 40x40]
|
Loading…
Add table
Add a link
Reference in a new issue