summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/flexbox-flex-wrap-wrap.htm
blob: dbd3081e442470054fb766488df06e5be45e4f43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
	<head>
		<title>CSS Flexbox Test: Flex-wrap = wrap</title>
		<link rel="author" title="Gavin Elster" href="mailto:gavin.elster@me.com">
		<link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
		<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-wrap-property">
		<link rel="match" href="reference/flexbox-flex-direction-ref.htm" />
		<meta name="assert" content="Test checks that flex elements wrap left-to-right within their flex container when flex-wrap = 'wrap', matching the writing direction. This assumes writing-direction = horizontal-tb', and direction = 'ltr'.">
		<style>

		/* Test specific Styles */

			.flex-wrapper {
				display: flex;
				flex-wrap: wrap;
			}

		/* Test-series styles */

			.flex-wrapper {
				width:  120px;
				height: 120px;

				/* should only display on error */
				background: red;

				/* Enforce writing mode */
				direction: ltr;
				writing-mode: horizontal-tb;
			}

			.flex-wrapper div {
				width:  38px;
				height: 38px;

				background: green;
				border: 1px solid limegreen;

				color: white;
				line-height: 40px;
				text-align: center;
				vertical-align: middle;
			}
		</style>
	</head>
	<body>
		<p>The test passes if there is a 3x3 grid of green squares, numbered 1-9 left-to-right and top-to-bottom, and there is no red.</p>
		<div class="flex-wrapper">
			<div>1</div><div>2</div><div>3</div>
			<div>4</div><div>5</div><div>6</div>
			<div>7</div><div>8</div><div>9</div>
		</div>
	</body>
</html>