Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<title>CSS Container Queries Test: query of inline-size container is affected by min-width property</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/cq-testcommon.js"></script>
<style>
#container {
container-type: inline-size;
min-width: 200px;
width: fit-content;
}
@container (min-width: 200px) {
#child { color: green }
}
</style>
<div id="container">
<div id="child">Green</div>
</div>
<script>
setup(() => assert_implements_size_container_queries());
test(() => {
assert_equals(getComputedStyle(child).color, "rgb(0, 128, 0)");
}, "min-width of inline-size container affects container size");
</script>