mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
e3f693ca7c
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.
15 lines
435 B
HTML
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="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><path d="M0,0h10v10h-10v-10"></path></svg>">
|