Skip to content

Commit 8e345a5

Browse files
Psychpsyoaethanyc
authored andcommitted
Add new size-containment test
Firefox fails this one, Chrome passes it.
1 parent 226fbab commit 8e345a5

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

css/css-contain/contain-size-014.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>size-contained elements should still ignore children, even with an aspect-ratio</title>
4+
<link rel="author" title="Psychpsyo" href="[email protected]">
5+
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
6+
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
7+
<style>
8+
#outer {
9+
position: relative;
10+
}
11+
#bottom {
12+
container-type: size;
13+
aspect-ratio: 1;
14+
background-color: red;
15+
width: 100px;
16+
}
17+
#top {
18+
position: absolute;
19+
top: 0;
20+
left: 0;
21+
background-color: green;
22+
width: 100px;
23+
height: 100px;
24+
}
25+
</style>
26+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
27+
<div id="outer">
28+
<div id="bottom">
29+
<img height="200">
30+
</div>
31+
<div id="top"></div>
32+
</div>

0 commit comments

Comments
 (0)