Skip to content

Commit a11782a

Browse files
abhijeetkchromium-wpt-export-bot
authored andcommitted
[css-flexbox] Move columns-center-with-margins.html test from css3/flexbox to WPT
Migrate this test out of third_party/blink/web_tests/css3/flexbox and into the WPT-specific directory, adding links to the relevant specs and a test assertion describing its purpose. Bug: 1063749 Change-Id: I46beff57bed22cd3b1795c10d7195ad7cfdd2324 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2121938 Commit-Queue: Abhijeet Kandalkar <[email protected]> Reviewed-by: David Grogan <[email protected]> Cr-Commit-Position: refs/heads/master@{#753932}
1 parent 169a141 commit a11782a

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>CSS Flexbox: Change to auto-margin items in column flexbox</title>
5+
<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#valdef-flex-direction-column">
6+
<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#propdef-align-self">
7+
<link rel="match" href="reference/columns-center-with-margins-001-ref.html">
8+
<meta name="assert" content="This test ensures that auto margins for column flows are correctly calculated"/>
9+
<link href="support/flexbox.css" rel="stylesheet">
10+
<style>
11+
.flexbox {
12+
border: 1px solid black;
13+
width: 400px;
14+
height: 200px;
15+
}
16+
.item1 {
17+
margin: 0 auto;
18+
background: lightblue;
19+
}
20+
.item1v {
21+
margin: auto 0;
22+
background: lightblue;
23+
}
24+
.item2 {
25+
background: lime;
26+
}
27+
</style>
28+
</head>
29+
<body>
30+
<p>The test passes if the flex items are properly centered in each column</p>
31+
<div class="flexbox column">
32+
<div class="item1">centeredWithMargins</div>
33+
<div class="item2 align-self-center">centeredWithAlignSelf</div>
34+
</div>
35+
<div style="writing-mode: vertical-lr;">
36+
<div class="flexbox column">
37+
<div class="item1v">centeredWithMargins</div>
38+
<div class="item2 align-self-center">centeredWithAlignSelf</div>
39+
</div>
40+
</div>
41+
</body>
42+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link href="../support/flexbox.css" rel="stylesheet">
5+
<style>
6+
.flexbox {
7+
border: 1px solid black;
8+
width: 400px;
9+
height: 200px;
10+
}
11+
.item1 {
12+
background: lightblue;
13+
}
14+
.item2 {
15+
background: lime;
16+
}
17+
</style>
18+
</head>
19+
<body>
20+
<p>The test passes if the flex items are properly centered in each column</p>
21+
<div class="flexbox column">
22+
<div class="item1 align-self-center">centeredWithMargins</div>
23+
<div class="item2 align-self-center">centeredWithAlignSelf</div>
24+
</div>
25+
<div style="writing-mode: vertical-lr;">
26+
<div class="flexbox column">
27+
<div class="item1 align-self-center">centeredWithMargins</div>
28+
<div class="item2 align-self-center">centeredWithAlignSelf</div>
29+
</div>
30+
</div>
31+
</body>
32+
</html>

0 commit comments

Comments
 (0)