Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaron authored Aug 11, 2018
1 parent 619c318 commit d31eaca
Show file tree
Hide file tree
Showing 16 changed files with 723 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: 'contain: layout' element should contain absolute position elements.</title>
<link rel="author" title="Kyle Zentner" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
<link rel="match" href="contain-paint-containing-block-absolute-001-ref.html">
<style>
#a {
contain: layout;
width: 100px;
height: 100px;
background: red;
margin: 50px;
}
#b {
position: absolute;
top: 0;
left: 0;
width: 100px;
height: 100px;
background: green;
}
</style>
</head>
<body>
<div id="a">
<div>
<div id="b"></div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: 'contain: layout' element should contain fixed position elements.</title>
<link rel="author" title="Kyle Zentner" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
<link rel="match" href="contain-paint-containing-block-fixed-001-ref.html">
<style>
#a {
contain: layout;
width: 100px;
height: 100px;
background: red;
margin: 50px;
}
#b {
position: fixed;
top: 0;
left: 0;
width: 100px;
height: 100px;
background: green;
}
</style>
</head>
<body>
<div id="a">
<div>
<div id="b"></div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: 'contain: layout' should contain floats as a formatting context.</title>
<link rel="author" title="Kyle Zentner" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-containment-1/#containment-layout">
<link rel="match" href="contain-paint-formatting-context-float-001-ref.html">
<style>
#left {
float: left;
height: 50px;
width: 10px;
background: blue;
}
#a {
contain: layout;
background: red;
margin: 10px;
width: 50px;
height: 50px;
}
#b {
clear: left;
width: 50px;
height: 50px;
background: green;
}
</style>
</head>
<body>
<div id="left"></div>
<div id="a">
<div id="b"></div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Reftest Test</title>
<link rel="author" title="Kyle Zentner" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<style>
#a {
background: blue;
margin: 10px;
width: 50px;
height: 50px;
}
#b {
width: 50px;
height: 40px;
background: green;
}
#b-padding {
height: 10px;
}
#c {
width: 50px;
height: 10px;
background: lightblue;
}
</style>
</head>
<body>
<div id="a">
<div id="b-padding"></div>
<div id="b"></div>
<div id="c"></div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: 'contain: layout' with a vertical margin child. Margin collapse should not occur, and neither should overflow clipping.</title>
<link rel="author" title="Kyle Zentner" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-containment-1/#containment-layout">
<link rel="match" href="contain-paint-formatting-context-margin-001-ref.html">
<style>
#a {
contain:layout;
background: blue;
margin: 10px;
width: 50px;
height: 50px;
}
#b {
width: 50px;
height: 40px;
background: green;
margin-top: 10px;
}
#c {
background: lightblue;
width: 50px;
height: 10px;
}
</style>
</head>
<body>
<div id="a">
<div id="b"></div>
<div id="c"></div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: 'contain: layout' should not create a stacking context when no principle box is generated.</title>
<link rel="author" title="Yusuf Sermet" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-contain/#containment-layout">
<link rel="match" href="contain-paint-ignored-cases-no-principal-box-001-ref.html">
<style>
div {
position: relative;
width: 100px;
}
#div1,
#div3 {
background-color: #cfc;
height: 100px;
}
#div1 {
z-index: 5;
}
#div2 {
display: contents;
contain: layout;
background-color: #fdd;
height: 100px;
top: -20px;
}
#div2_1 {
background-color: #ffc;
z-index: 6;
top: -10px;
height: 100px;
}
#div2_2 {
z-index: 3;
position: absolute;
top: -15px;
width: 40px;
height: 300px;
background-color: #ddf;
}
#div3 {
z-index: 2;
top: -50px;
}
</style>
</head>
<body>
<div id="div1"></div>

<div id="div2">
<div id="div2_1"></div>

<div id="div2_2"></div>
</div>

<div id="div3"></div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Kyle Zentner" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<style>
#a {
display: contents;
width: 100px;
height: 100px;
background: green;
margin: 50px;
}
#b {
position: absolute;
top: 0;
left: 0;
width: 100px;
height: 100px;
background: green;
}
</style>
</head>
<body>
<div id="a">
<div>
<div id="b"></div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: 'contain: layout' element should not contain absolute/fixed position elements when no principal box is generated.</title>
<link rel="author" title="Yusuf Sermet" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
<link rel="match" href="contain-layout-ignored-cases-no-principal-box-002-ref.html">
<style>
#a {
contain: layout;
display: contents;
width: 100px;
height: 100px;
background: red;
margin: 50px;
}
#b {
position: absolute;
top: 0;
left: 0;
width: 100px;
height: 100px;
background: green;
}
</style>
</head>
<body>
<div id="a">
<div>
<div id="b"></div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Kyle Zentner" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<style>
#a {
display: contents;
width: 100px;
height: 100px;
background: red;
margin: 50px;
}
#b {
position: fixed;
top: 0;
left: 0;
width: 100px;
height: 100px;
background: green;
}
</style>
</head>
<body>
<div id="a">
<div>
<div id="b"></div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: 'contain: layout' element should not contain absolute/fixed position elements when no principal box is generated.</title>
<link rel="author" title="Yusuf Sermet" href="mailto:[email protected]">
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
<link rel="match" href="contain-layout-ignored-cases-no-principal-box-003-ref.html">
<style>
#a {
contain: layout;
display: contents;
width: 100px;
height: 100px;
background: red;
margin: 50px;
}
#b {
position: fixed;
top: 0;
left: 0;
width: 100px;
height: 100px;
background: green;
}
</style>
</head>
<body>
<div id="a">
<div>
<div id="b"></div>
</div>
</div>
</body>
</html>
Loading

0 comments on commit d31eaca

Please sign in to comment.