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

LibWeb: Stretch-fit flex items with aspect ratio but no fixed sizes

This solves a particular issue with SVG as flex items, where the SVG has
an intrinsic aspect ratio via its viewBox, but no explicit natural width
or height.

Makes all corporate sponsor logos show up on https://ziglang.org/ :^)
This commit is contained in:
Andreas Kling 2024-02-25 12:56:01 +01:00
parent 92a7fd77f4
commit a61f09a010
5 changed files with 43 additions and 15 deletions

View file

@ -1,11 +1,11 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x69.984375 [BFC] children: not-inline
Box <body> at (10,10) content-size 780x51.984375 flex-container(row) [FFC] children: not-inline
ImageBox <img> at (11,11) content-size 66.65625x49.984375 flex-item children: not-inline
ImageBox <img> at (11,11) content-size 66.65625x50 flex-item children: not-inline
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x71.984375]
PaintableBox (Box<BODY>) [9,9 782x53.984375]
ImagePaintable (ImageBox<IMG>) [10,10 68.65625x51.984375]
PaintableBox (Box<BODY>) [9,9 782x53.984375] overflow: [10,10 780x52]
ImagePaintable (ImageBox<IMG>) [10,10 68.65625x52]