Bug 1622935 Part 4c - Add additional single-line flex container fragmentation reftests. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D73170
This commit is contained in:
Ting-Yu Lin 2020-05-08 22:33:52 +00:00
Родитель 8957f55e9e
Коммит d2c9a57153
27 изменённых файлов: 2555 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,99 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of fixed height single-line column flex container with flexible length flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of flexible length flex items in a fixed height single-line column flex container, with various combinations of margin/border/padding, alignments, and row-gap.">
<style>
.multicol {
height: 50px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
height: 150px;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header {
background: cyan;
flex-grow: 2;
}
nav, article, footer {
width: 30px;
}
nav {
background: magenta;
flex-grow: 1;
align-self: flex-start;
}
article {
background: yellow;
flex-grow: 1;
align-self: center;
}
footer {
background: black;
flex-grow: 2;
align-self: flex-end;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="height: 165px; row-gap: 5px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,103 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of fixed height single-line column-reverse flex container with flexible length flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of flexible length flex items in a fixed height single-line column-reverse flex container, with various combinations of margin/border/padding, alignments, and row-gap.">
<style>
.multicol {
height: 50px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column-reverse;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
height: 150px;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
footer {
background: cyan;
height: 50px;
flex-grow: 2;
}
article, nav, header {
width: 30px;
}
article {
background: magenta;
height: 25px;
flex-grow: 1;
align-self: flex-start;
}
nav {
background: yellow;
height: 25px;
flex-grow: 1;
align-self: center;
}
header {
background: black;
height: 50px;
flex-grow: 2;
align-self: flex-end;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="height: 165px; row-gap: 5px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line column flex container with height:auto flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of height:auto flex items in a height:auto single-line column flex container, with various combinations of margin/border/padding, alignments, and row-gap.">
<style>
.multicol {
height: 50px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header {
background: cyan;
}
header > div {
height: 50px;
}
nav, article, footer {
width: 30px;
}
nav {
background: magenta;
align-self: flex-start;
}
nav > div {
height: 25px;
}
article {
background: yellow;
align-self: center;
}
article > div {
height: 25px;
}
footer {
background: black;
align-self: flex-end;
}
footer > div {
height: 50px;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="row-gap: 5px">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line column-reverse flex container with height:auto flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of height:auto flex items in a height:auto single-line column flex container, with various combinations of margin/border/padding, alignments, and row-gap.">
<style>
.multicol {
height: 50px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column-reverse;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
footer {
background: cyan;
}
footer > div {
height: 50px;
}
article, nav, header {
width: 30px;
}
article {
background: magenta;
align-self: flex-start;
}
article > div {
height: 25px;
}
nav {
background: yellow;
align-self: center;
}
nav > div {
height: 25px;
}
header {
background: black;
align-self: flex-end;
}
header > div {
height: 50px;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="row-gap: 5px">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,112 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line column flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line column flex container, with various combinations of margin/border/padding, alignments, and row-gap. Also use a script to enlarge multicol height.">
<style>
.multicol {
height: 30px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header {
background: cyan;
height: 50px;
}
nav, article, footer {
width: 30px;
}
nav {
background: magenta;
height: 25px;
align-self: flex-start;
}
article {
background: yellow;
height: 25px;
align-self: center;
}
footer {
background: black;
height: 50px;
align-self: flex-end;
}
body.multicol-children-height > .multicol {
height: 50px;
}
</style>
<script>
function runTest() {
document.body.offsetHeight;
/* Enlarge the multicol's height to exercise pulling and pushing flex items
of an already fragmented flex container. */
document.body.classList.add("multicol-children-height");
}
</script>
<body onload="runTest()">
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="row-gap: 5px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,112 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line column-reverse flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line column-reverse flex container, with various combinations of margin/border/padding, alignments, and row-gap. Also use a script to enlarge multicol height.">
<style>
.multicol {
height: 30px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column-reverse;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
footer {
background: cyan;
height: 50px;
}
article, nav, header {
width: 30px;
}
article {
background: magenta;
height: 25px;
align-self: flex-start;
}
nav {
background: yellow;
height: 25px;
align-self: center;
}
header {
background: black;
height: 50px;
align-self: flex-end;
}
body.multicol-children-height > .multicol {
height: 50px;
}
</style>
<script>
function runTest() {
document.body.offsetHeight;
/* Enlarge the multicol's height to exercise pulling and pushing flex items
of an already fragmented flex container. */
document.body.classList.add("multicol-children-height");
}
</script>
<body onload="runTest()">
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="row-gap: 5px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,112 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line column flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line column flex container, with various combinations of margin/border/padding, alignments, and row-gap. Also use a script to shrink multicol height.">
<style>
.multicol {
height: 80px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header {
background: cyan;
height: 50px;
}
nav, article, footer {
width: 30px;
}
nav {
background: magenta;
height: 25px;
align-self: flex-start;
}
article {
background: yellow;
height: 25px;
align-self: center;
}
footer {
background: black;
height: 50px;
align-self: flex-end;
}
body.multicol-children-height > .multicol {
height: 50px;
}
</style>
<script>
function runTest() {
document.body.offsetHeight;
/* Shrink the multicol's height to exercise pulling and pushing flex items
of an already fragmented flex container. */
document.body.classList.add("multicol-children-height");
}
</script>
<body onload="runTest()">
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="row-gap: 5px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,112 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line column-reverse flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line column-reverse flex container, with various combinations of margin/border/padding, alignments, and row-gap. Also use a script to shrink multicol height.">
<style>
.multicol {
height: 80px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column-reverse;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
footer {
background: cyan;
height: 50px;
}
article, nav, header {
width: 30px;
}
article {
background: magenta;
height: 25px;
align-self: flex-start;
}
nav {
background: yellow;
height: 25px;
align-self: center;
}
header {
background: black;
height: 50px;
align-self: flex-end;
}
body.multicol-children-height > .multicol {
height: 50px;
}
</style>
<script>
function runTest() {
document.body.offsetHeight;
/* Shrink the multicol's height to exercise pulling and pushing flex items
of an already fragmented flex container. */
document.body.classList.add("multicol-children-height");
}
</script>
<body onload="runTest()">
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="row-gap: 5px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,97 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test Reference: Fragmentation of single-line column flex container</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<style>
.multicol {
height: 50px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
height: 85px;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
.gap {
height: 5px;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header {
background: cyan;
height: 50px;
}
nav, article, footer {
width: 30px;
}
nav {
background: magenta;
height: 25px;
}
article {
background: yellow;
height: 25px;
position: relative;
left: 5px;
}
footer {
background: black;
height: 50px;
position: relative;
left: 10px;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><div class="gap"></div><nav></nav><div class="gap"></div><article></article><div class="gap"></div><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,103 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of fixed height single-line column flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-2-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a fixed height single-line column flex container, with various combinations of margin/border/padding, alignments, and row-gap. The height of the flex container is made shorter than its flex items.">
<style>
.multicol {
height: 50px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
/* Height is deliberately made shorter than all its flex items. */
height: 85px;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
flex-shrink: 0;
}
header {
background: cyan;
height: 50px;
}
nav, article, footer {
width: 30px;
}
nav {
background: magenta;
height: 25px;
align-self: flex-start;
}
article {
background: yellow;
height: 25px;
align-self: center;
}
footer {
background: black;
height: 50px;
align-self: flex-end;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and row-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="row-gap: 5px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,78 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test Reference: Fragmentation of single-line column flex container</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<style>
.multicol {
height: 50px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
padding: 15px 0;
}
.flexContainer {
background: gray;
box-decoration-break: clone;
}
.gap {
height: 5px;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header {
background: cyan;
height: 50px;
}
nav, article, footer {
width: 30px;
}
nav {
background: magenta;
height: 25px;
}
article {
background: yellow;
height: 25px;
position: relative;
left: 5px;
}
footer {
background: black;
height: 50px;
position: relative;
left: 10px;
}
</style>
<body>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with row-gap. -->
<div class="multicol">
<div class="flexContainer">
<header></header><div class="gap"></div><nav></nav><div class="gap"></div><article></article><div class="gap"></div><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,81 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto and box-decoration-break:clone single-line column flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-3-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line column flex container, with various combinations of margin/border/padding, alignments, row-gap, and box-decoration-break:clone.">
<style>
.multicol {
height: 80px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
background: gray;
border: solid white;
border-width: 15px 0;
box-decoration-break: clone;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header {
background: cyan;
height: 50px;
}
nav, article, footer {
width: 30px;
}
nav {
background: magenta;
height: 25px;
align-self: flex-start;
}
article {
background: yellow;
height: 25px;
align-self: center;
}
footer {
background: black;
height: 50px;
align-self: flex-end;
}
</style>
<body>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with row-gap. -->
<div class="multicol">
<div class="flexContainer" style="row-gap: 5px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,81 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto and box-decoration-break:clone single-line column-reverse flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-3-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line column-reverse flex container, with various combinations of margin/border/padding, alignments, row-gap, and box-decoration-break:clone.">
<style>
.multicol {
height: 80px;
width: 190px;
column-width: 40px;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column-reverse;
background: gray;
border: solid white;
border-width: 15px 0;
box-decoration-break: clone;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
footer {
background: cyan;
height: 50px;
}
article, nav, header {
width: 30px;
}
article {
background: magenta;
height: 25px;
align-self: flex-start;
}
nav {
background: yellow;
height: 25px;
align-self: center;
}
header {
background: black;
height: 50px;
align-self: flex-end;
}
</style>
<body>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with row-gap. -->
<div class="multicol">
<div class="flexContainer" style="row-gap: 5px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html class="reftest-paged">
<meta charset="utf-8">
<title>CSS Flexbox Test Reference: Fragmentation of single-line column flex container in print context</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<style>
@page { size:5in 3in; margin:0.5in; }
html, body {
font-size: 12pt; margin: 0;
}
.flexContainer {
display: block;
background: gray;
border: 0.25in solid lightgray;
}
article {
background: yellow;
height: 2in;
}
</style>
<body>
<div style="height: 0.25in; background: lightblue"></div>
<div class="flexContainer">
<div class="flexContainer">
<div class="flexContainer">
<!-- <article> is expected to have 1 inch in the first page and 1 inch
in the second page. -->
<article></article>
</div>
</div>
</div>
<div style="height: 0.25in; background: lightblue"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html class="reftest-paged">
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of nested height:auto flex containers with a tall flex item in print context, not top-of-page</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-column-4-ref.html">
<meta name="assert" content="This test verifies fragmentation of a tall flex item in nested height:auto single-line column flex containers in print context.">
<style>
@page { size:5in 3in; margin:0.5in; }
html, body {
font-size: 12pt; margin: 0;
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
background: gray;
border: 0.25in solid lightgray;
}
article {
background: yellow;
height: 2in;
}
</style>
<body>
<div style="height: 0.25in; background: lightblue"></div>
<div class="flexContainer">
<div class="flexContainer">
<div class="flexContainer">
<!-- <article> is expected to have 1 inch in the first page and 1 inch
in the second page. -->
<article></article>
</div>
</div>
</div>
<div style="height: 0.25in; background: lightblue"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line row flex container with height:auto flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-row-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of height:auto flex items in a height:auto single-line row flex container, with various combinations of margin/border/padding, alignments, and column-gap.">
<style>
.multicol {
height: 50px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
flex-grow: 1;
}
header {
background: cyan;
}
header > div {
height: 100px;
}
nav {
background: magenta;
align-self: flex-start;
}
nav > div {
height: 25px;
}
article {
background: yellow;
align-self: center;
}
article > div {
height: 50px;
}
footer {
background: black;
align-self: flex-end;
}
footer > div {
height: 75px;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with border, padding, and column-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="column-gap: 4px">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line row-reverse flex container with height:auto flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-row-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of height:auto flex items in a height:auto single-line row-reverse flex container, with various combinations of margin/border/padding, alignments, and column-gap.">
<style>
.multicol {
height: 50px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: row-reverse;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
flex-grow: 1;
}
footer {
background: cyan;
}
footer > div {
height: 100px;
}
article {
background: magenta;
align-self: flex-start;
}
article > div {
height: 25px;
}
nav {
background: yellow;
align-self: center;
}
nav > div {
height: 50px;
}
header {
background: black;
align-self: flex-end;
}
header > div {
height: 75px;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
<!-- Test a container with border, padding, and column-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="column-gap: 4px">
<header><div></div></header><nav><div></div></nav>
<article><div></div></article><footer><div></div></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,112 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line row flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-row-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line row flex container, with various combinations of margin/border/padding, alignments, and column-gap. Also use a script to enlarge multicol height.">
<style>
.multicol {
height: 30px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
flex-grow: 1;
}
header {
background: cyan;
height: 100px;
}
nav {
background: magenta;
height: 25px;
align-self: flex-start;
}
article {
background: yellow;
height: 50px;
align-self: center;
}
footer {
background: black;
height: 75px;
align-self: flex-end;
}
body.multicol-children-height > .multicol {
height: 50px;
}
</style>
<script>
function runTest() {
document.body.offsetHeight;
/* Enlarge the multicol's height to exercise pulling and pushing flex items
of an already fragmented flex container. */
document.body.classList.add("multicol-children-height");
}
</script>
<body onload="runTest()">
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and column-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="column-gap: 4px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,112 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line row-reverse flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-row-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line row-reverse flex container, with various combinations of margin/border/padding, alignments, and column-gap. Also use a script to enlarge multicol height.">
<style>
.multicol {
height: 30px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: row-reverse;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
footer, article, nav, header {
flex-grow: 1;
}
footer {
background: cyan;
height: 100px;
}
article {
background: magenta;
height: 25px;
align-self: flex-start;
}
nav {
background: yellow;
height: 50px;
align-self: center;
}
header {
background: black;
height: 75px;
align-self: flex-end;
}
body.multicol-children-height > .multicol {
height: 50px;
}
</style>
<script>
function runTest() {
document.body.offsetHeight;
/* Enlarge the multicol's height to exercise pulling and pushing flex items
of an already fragmented flex container. */
document.body.classList.add("multicol-children-height");
}
</script>
<body onload="runTest()">
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and column-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="column-gap: 4px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,112 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line row flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-row-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line row flex container, with various combinations of margin/border/padding, alignments, and column-gap. Also use a script to shrink multicol height.">
<style>
.multicol {
height: 80px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
flex-grow: 1;
}
header {
background: cyan;
height: 100px;
}
nav {
background: magenta;
height: 25px;
align-self: flex-start;
}
article {
background: yellow;
height: 50px;
align-self: center;
}
footer {
background: black;
height: 75px;
align-self: flex-end;
}
body.multicol-children-height > .multicol {
height: 50px;
}
</style>
<script>
function runTest() {
document.body.offsetHeight;
/* Shrink the multicol's height to exercise pulling and pushing flex items
of an already fragmented flex container. */
document.body.classList.add("multicol-children-height");
}
</script>
<body onload="runTest()">
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and column-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="column-gap: 4px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,112 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto single-line row-reverse flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-row-1-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line row-reverse flex container, with various combinations of margin/border/padding, alignments, and column-gap. Also use a script to shrink multicol height.">
<style>
.multicol {
height: 80px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: row-reverse;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
footer, article, nav, header {
flex-grow: 1;
}
footer {
background: cyan;
height: 100px;
}
article {
background: magenta;
height: 25px;
align-self: flex-start;
}
nav {
background: yellow;
height: 50px;
align-self: center;
}
header {
background: black;
height: 75px;
align-self: flex-end;
}
body.multicol-children-height > .multicol {
height: 50px;
}
</style>
<script>
function runTest() {
document.body.offsetHeight;
/* Shrink the multicol's height to exercise pulling and pushing flex items
of an already fragmented flex container. */
document.body.classList.add("multicol-children-height");
}
</script>
<body onload="runTest()">
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and column-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="column-gap: 4px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test Reference: Fragmentation of single-line row flex container</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<style>
.multicol {
height: 50px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
height: 80px;
position: relative;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
.gap {
width: 4px;
height: 100%;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
width: 25px;
}
header {
background: cyan;
height: 100px;
position: absolute;
top: 0px;
}
nav {
background: magenta;
height: 25px;
position: absolute;
top: 0px;
left: 25px;
}
article {
background: yellow;
height: 50px;
position: absolute;
top: 15px;
left: 50px;
}
footer {
background: black;
height: 75px;
position: absolute;
top: 5px;
left: 75px;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<!-- Adjust top to simulate padding. -->
<header style="top: 5px"></header><nav style="top: 5px"></nav>
<article style="top: 20px"></article><footer style="top: 10px"></footer>
</div>
</div>
<!-- Test a container with border, padding, and column-gap. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header style="width: 22px; top: 5px"></header>
<nav style="width: 22px; top: 5px; left: 26px"></nav>
<article style="width: 22px; top: 20px; left: 52px;"></article>
<footer style="width: 22px; top: 10px; left: 78px;"></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,100 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of fixed height single-line row flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-row-2-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line row flex container, with various combinations of margin/border/padding, alignments, and column-gap. The height of the flex container is made shorter than <header>.">
<style>
.multicol {
height: 50px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid lightgray;
/* Height is deliberately made shorter than <header>. */
height: 80px;
}
.border-padding {
border-width: 10px 0;
padding: 5px 0;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
flex-grow: 1;
}
header {
background: cyan;
height: 100px;
}
nav {
background: magenta;
height: 25px;
align-self: flex-start;
}
article {
background: yellow;
height: 50px;
align-self: center;
}
footer {
background: black;
height: 75px;
align-self: flex-end;
}
</style>
<body>
<!-- Basic one without any margin/border/padding. -->
<div class="multicol">
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border and padding. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and column-gap. -->
<div class="multicol">
<div class="flexContainer border-padding" style="column-gap: 4px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,92 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test Reference: Fragmentation of single-line row flex container</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<style>
.multicol {
height: 50px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
padding: 15px 0;
}
.flexContainer {
background: gray;
/* border-width is 0 by default; some sub-testcases will increase it. */
border: 0 solid white;
height: 100px;
position: relative;
}
.gap {
width: 4px;
height: 100%;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
width: 25px;
}
header {
background: cyan;
height: 100px;
position: absolute;
top: 0px;
}
nav {
background: magenta;
height: 25px;
position: absolute;
top: 0px;
left: 25px;
}
article {
background: yellow;
height: 50px;
position: absolute;
top: 25px;
left: 50px;
}
footer {
background: black;
height: 75px;
position: absolute;
top: 25px;
left: 75px;
}
</style>
<body>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with border, padding, and column-gap. -->
<div class="multicol">
<div class="flexContainer border-padding">
<header style="width: 22px"></header>
<nav style="width: 22px; left: 26px"></nav>
<article style="width: 22px; top: 25px; left: 52px;"></article>
<footer style="width: 22px; top: 25px; left: 78px;"></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,81 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto and box-decoration-break:clone single-line row flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-row-3-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line row flex container, with various combinations of margin/border/padding, alignments, column-gap, and box-decoration-break:clone.">
<style>
.multicol {
height: 80px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
background: gray;
border: 0 solid white;
border-width: 15px 0;
box-decoration-break: clone;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
flex-grow: 1;
}
header {
background: cyan;
height: 100px;
}
nav {
background: magenta;
height: 25px;
align-self: flex-start;
}
article {
background: yellow;
height: 50px;
align-self: center;
}
footer {
background: black;
height: 75px;
align-self: flex-end;
}
</style>
<body>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with column-gap. -->
<div class="multicol">
<div class="flexContainer" style="column-gap: 4px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,81 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Fragmentation of height:auto and box-decoration-break:clone single-line row-reverse flex container with fixed height flex items</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
<link rel="match" href="flexbox-single-row-3-ref.html">
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line row-reverse flex container, with various combinations of margin/border/padding, alignments, column-gap, and box-decoration-break:clone.">
<style>
.multicol {
height: 80px;
width: 320px;
column-count: 3;
column-fill: auto;
column-gap: 10px;
border: 5px solid orange;
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
}
.flexContainer {
display: flex;
flex-wrap: nowrap;
flex-direction: row-reverse;
background: gray;
border: 0 solid white;
border-width: 15px 0;
box-decoration-break: clone;
}
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
header, nav, article, footer {
flex-grow: 1;
}
footer {
background: cyan;
height: 100px;
}
article {
background: magenta;
height: 25px;
align-self: flex-start;
}
nav {
background: yellow;
height: 50px;
align-self: center;
}
header {
background: black;
height: 75px;
align-self: flex-end;
}
</style>
<body>
<!-- Test a container with margin-top. -->
<div class="multicol">
<div class="flexContainer" style="margin-top: 25px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container not at the top of the column/page. -->
<div class="multicol">
<div style="height: 25px"></div>
<div class="flexContainer">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
<!-- Test a container with column-gap. -->
<div class="multicol">
<div class="flexContainer" style="column-gap: 4px">
<header></header><nav></nav><article></article><footer></footer>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -43,7 +43,28 @@ fuzzy-if(Android&&webrender,0-128,0-10) == flexbox-empty-2d.html flexbox-empty-2
# Tests for how we fragment flex items in a single-line column flex container. # Tests for how we fragment flex items in a single-line column flex container.
== flexbox-single-column-1a.html flexbox-single-column-1-ref.html == flexbox-single-column-1a.html flexbox-single-column-1-ref.html
== flexbox-single-column-1b.html flexbox-single-column-1-ref.html == flexbox-single-column-1b.html flexbox-single-column-1-ref.html
== flexbox-single-column-1c.html flexbox-single-column-1-ref.html
== flexbox-single-column-1d.html flexbox-single-column-1-ref.html
== flexbox-single-column-1e.html flexbox-single-column-1-ref.html
== flexbox-single-column-1f.html flexbox-single-column-1-ref.html
== flexbox-single-column-1g.html flexbox-single-column-1-ref.html
== flexbox-single-column-1h.html flexbox-single-column-1-ref.html
== flexbox-single-column-1i.html flexbox-single-column-1-ref.html
== flexbox-single-column-1j.html flexbox-single-column-1-ref.html
== flexbox-single-column-2.html flexbox-single-column-2-ref.html
== flexbox-single-column-3a.html flexbox-single-column-3-ref.html
== flexbox-single-column-3b.html flexbox-single-column-3-ref.html
== flexbox-single-column-4.html flexbox-single-column-4-ref.html
# Tests for how we fragment flex items in a single-line row flex container. # Tests for how we fragment flex items in a single-line row flex container.
== flexbox-single-row-1a.html flexbox-single-row-1-ref.html == flexbox-single-row-1a.html flexbox-single-row-1-ref.html
== flexbox-single-row-1b.html flexbox-single-row-1-ref.html == flexbox-single-row-1b.html flexbox-single-row-1-ref.html
== flexbox-single-row-1c.html flexbox-single-row-1-ref.html
== flexbox-single-row-1d.html flexbox-single-row-1-ref.html
== flexbox-single-row-1e.html flexbox-single-row-1-ref.html
== flexbox-single-row-1f.html flexbox-single-row-1-ref.html
== flexbox-single-row-1g.html flexbox-single-row-1-ref.html
== flexbox-single-row-1h.html flexbox-single-row-1-ref.html
== flexbox-single-row-2.html flexbox-single-row-2-ref.html
== flexbox-single-row-3a.html flexbox-single-row-3-ref.html
== flexbox-single-row-3b.html flexbox-single-row-3-ref.html