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

LibWeb: Accept height: {min,max,fit}-content

And treat them as "auto" for now, per CSS-SIZING-3, with a FIXME about
supporting more layout directions.

This fixes an issue on MDN where `height: max-content` was not
overriding height from non-CSS presentational hints.
This commit is contained in:
Andreas Kling 2023-08-20 18:25:54 +02:00
parent 90e95d38d7
commit 27ddfa84fa
4 changed files with 49 additions and 2 deletions

View file

@ -0,0 +1,26 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x139.46875 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x123.46875 children: inline
line 0 width: 376, height: 123.46875, bottom: 123.46875, baseline: 120
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 120x120]
frag 1 from TextNode start: 0, length: 1, rect: [128,114 8x17.46875]
" "
frag 2 from ImageBox start: 0, length: 0, rect: [136,8 120x120]
frag 3 from TextNode start: 0, length: 1, rect: [256,114 8x17.46875]
" "
frag 4 from ImageBox start: 0, length: 0, rect: [264,8 120x120]
ImageBox <img.min> at (8,8) content-size 120x120 children: not-inline
TextNode <#text>
ImageBox <img.max> at (136,8) content-size 120x120 children: not-inline
TextNode <#text>
ImageBox <img.fit> at (264,8) content-size 120x120 children: not-inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x139.46875]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x123.46875]
ImagePaintable (ImageBox<IMG>.min) [8,8 120x120]
TextPaintable (TextNode<#text>)
ImagePaintable (ImageBox<IMG>.max) [136,8 120x120]
TextPaintable (TextNode<#text>)
ImagePaintable (ImageBox<IMG>.fit) [264,8 120x120]