serenity/Tests/LibWeb/Layout/input/replaced-within-max-content.html
Zaggy1024 e3f693ca7c LibWeb: Resolve replaced element size constraints using aspect ratios
Some replaced elements can have intrinsic aspect ratios but no
intrinsic size. In these cases, the tentative sizes are undefined, and
can therefore sometimes be zero. However, when resolving the size
constraints, we are already guaranteed to have an intrinsic aspect
ratio, so let's use that instead to calculate the resolved sizes.
2023-09-04 12:40:17 +02:00

15 lines
435 B
HTML

<!DOCTYPE html>
<html>
<head>
<style>
.container {
width: max-content;
}
.replaced {
min-width: 150px;
max-width: 200px;
}
</style>
</head>
<body><div class="container"><img class="replaced" src="data:image/svg+xml,<svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;><path d=&quot;M0,0h10v10h-10v-10&quot;></path></svg>">