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

LibWeb: Treat % max-width as none when containing block size indefinite

This is technically "undefined behavior" per CSS 2.2, but it seems
sensible to mirror the behavior of max-height in the same situation.
It also appears to match how other engines behave.

Fixes #19242
This commit is contained in:
Andreas Kling 2023-06-14 18:35:02 +02:00
parent ff1606ffaf
commit 3a11b55286
7 changed files with 34 additions and 11 deletions

View file

@ -0,0 +1,4 @@
<!DOCTYPE html><style>
body { display: max-content; }
img { max-width: 100%; }
</style><body><div><img src="120.png">