Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 2 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-sizing/aspect-ratio/replaced-element-intrinsic-contribution-transferred-min-width-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS aspect-ratio: a replaced element's transferred minimum width and its max-width in its intrinsic width contributions</title>
<meta name="assert" content="A min-height transferred through a replaced element's aspect ratio is capped by a definite max-width, but not by an indefinite one, in the element's intrinsic width contributions.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
.container {
float: left;
clear: left;
}
canvas {
min-height: 200px;
}
</style>
<body onload="checkLayout('.container')">
<div class="container" data-expected-width="50"><canvas width="100" height="100" style="max-width: 50px"></canvas></div>
<div class="container" data-expected-width="200"><canvas width="100" height="100" style="max-width: min-content"></canvas></div>
<div class="container" data-expected-width="200"><canvas width="100" height="100" style="max-width: max-content"></canvas></div>
</body>