blob: 6a54e4a4059137d85277f499b02f01822add9b63 [file] [log] [blame]
<!doctype html>
<title>CSS Container Queries Test: Canvas as size container for focusable child with display</title>
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html">
<style>
canvas:focus-within {
background-color: green;
}
canvas {
display: block;
width: 100px;
height: 100px;
container-type: size;
}
#target { display: none; }
@container size(width = 100px) {
#target { display: block; }
}
</style>
<p>Test passes if there is a filled green square.</p>
<canvas>
<div id="target" tabIndex="1"></div>
</canvas>
<script>
target.focus();
</script>