summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/flexbox-writing-mode-016.html
blob: 94c732358351f990c2a4d7533b2e36598c2ec197 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<head>
  <title>
    CSS Test: Testing auto-sized flex containers
    with various 'writing-mode' values
    and various padding amounts on flex items.
  </title>
  <meta charset="utf-8">
  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
  <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#flex-direction-property">
  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#propdef-writing-mode">
  <link rel="match" href="flexbox-writing-mode-016-ref.html">
  <style>
  .container {
    display: flex;
    flex-direction: row;
    border: 2px solid purple;
    margin: 3px;
    /* This red should't be visible, because each container should shrinkwrap
       its sole child (and the child should cover up this background). */
    background: red;
    /* Float the containers, to test in "rows", with 1 row per writing-mode. */
    float: left;
  }
  br { clear: both; }

  .container > * {
    width: 10px;
    height: 10px;
    background: teal;
    border: 1px solid yellow;
  }
  .container > * > * {
    background: pink;
    height: 4px;
    width: 4px;
    border: 1px solid black;
  }

  .pad_top    { padding-top:    3px; }
  .pad_right  { padding-right:  4px; }
  .pad_bottom { padding-bottom: 5px; }
  .pad_left   { padding-left:   6px; }

  .hl  { writing-mode: horizontal-tb;  direction: ltr; }
  .hr  { writing-mode: horizontal-tb;  direction: rtl; }
  .vl  { writing-mode: vertical-lr;    direction: ltr; }
  .vr  { writing-mode: vertical-rl;    direction: ltr; }
  .vl_rtl { writing-mode: vertical-lr; direction: rtl; }
  .vr_rtl { writing-mode: vertical-rl; direction: rtl; }
  </style>
</head>
<body>
  <!-- Here, we test padding on each side of a flex item, across 6 different
       writing-mode combinations (writing-mode X direction). -->
  <div class="container hl">
    <div class="pad_top"><div></div></div>
  </div>
  <div class="container hl">
    <div class="pad_right"><div></div></div>
  </div>
  <div class="container hl">
    <div class="pad_bottom"><div></div></div>
  </div>
  <div class="container hl">
    <div class="pad_left"><div></div></div>
  </div>
  <br>

  <div class="container hr">
    <div class="pad_top"><div></div></div>
  </div>
  <div class="container hr">
    <div class="pad_right"><div></div></div>
  </div>
  <div class="container hr">
    <div class="pad_bottom"><div></div></div>
  </div>
  <div class="container hr">
    <div class="pad_left"><div></div></div>
  </div>
  <br>

  <div class="container vl">
    <div class="pad_top"><div></div></div>
  </div>
  <div class="container vl">
    <div class="pad_right"><div></div></div>
  </div>
  <div class="container vl">
    <div class="pad_bottom"><div></div></div>
  </div>
  <div class="container vl">
    <div class="pad_left"><div></div></div>
  </div>
  <br>

  <div class="container vr">
    <div class="pad_top"><div></div></div>
  </div>
  <div class="container vr">
    <div class="pad_right"><div></div></div>
  </div>
  <div class="container vr">
    <div class="pad_bottom"><div></div></div>
  </div>
  <div class="container vr">
    <div class="pad_left"><div></div></div>
  </div>
  <br>

  <div class="container vl_rtl">
    <div class="pad_top"><div></div></div>
  </div>
  <div class="container vl_rtl">
    <div class="pad_right"><div></div></div>
  </div>
  <div class="container vl_rtl">
    <div class="pad_bottom"><div></div></div>
  </div>
  <div class="container vl_rtl">
    <div class="pad_left"><div></div></div>
  </div>
  <br>

  <div class="container vr_rtl">
    <div class="pad_top"><div></div></div>
  </div>
  <div class="container vr_rtl">
    <div class="pad_right"><div></div></div>
  </div>
  <div class="container vr_rtl">
    <div class="pad_bottom"><div></div></div>
  </div>
  <div class="container vr_rtl">
    <div class="pad_left"><div></div></div>
  </div>
</body>
</html>