summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/subgrid/writing-directions-001-ref.html
blob: 90612516889e8feb5b5b0ce6820b44d8531ab8be (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
<!DOCTYPE HTML>
<html><head>
  <meta charset="utf-8">
  <title>Reference: nested subgrids map margin/border/padding according to writing direction</title>
  <link rel="author" title="Kurt Catti-Schmidt" href="mailto:kschmi@microsoft.com">
  <link rel="help" href="https://drafts.csswg.org/css-grid-2">
  <style>
html,body {
  font:12px/1 monospace;
}

.grid {
  display: grid;
  grid: 0.2em 1.4em / repeat(10, 30px);
  border: 1px solid;
  padding: 0 0 0 0;
}

div > div {
  display: grid;
  grid-column: 2 / span 3;
  grid: auto / subgrid;
  border: 1px solid;
  background: grey;
}

n {
  grid-row: 1;
  counter-increment: n;
}
n::before { content: counter(n, decimal); }

x {
  background: silver;
}

  </style>
</head>
<body>

<div class="grid">
  <n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n>
    <div style="grid-template-columns: subgrid; padding: 0 0 0 10px;">
      <div style="grid-template-columns: subgrid; grid-column: 1 /span 3; margin-right: 29px;">
        <x style="grid-column: 1; ">x</x>
      </div>
    </div>
</div>

<div class="grid">
  <n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n>
    <div style="grid-template-columns: subgrid;">
      <div style="grid-template-columns: subgrid; grid-column: 1 /span 3; margin-right: 29px; padding-left: 10px;">
        <x style="grid-column: 1; ">x</x>
      </div>
    </div>
</div>

<div class="grid">
  <n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n>
    <div style="grid-template-columns: subgrid; border-right: 20px solid; border-left: 10px solid;">
      <div style="grid-template-columns: subgrid; grid-column-start:span 3; margin-right: 10px;">
        <x style="grid-column: 1;">x</x>
      </div>
    </div>
</div>

<div class="grid">
  <n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n>
    <div style="grid-template-columns: subgrid;">
      <div style="grid-template-columns: subgrid; grid-column-start:span 3; border-right: 20px solid; border-left: 10px solid; margin-right: 29px;">
        <x style="grid-column: 1;">x</x>
      </div>
    </div>
</div>

<div class="grid">
  <n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n>
    <div style="grid-template-columns: subgrid; margin: 0 20px 0 0;">
      <div style="grid-template-columns: subgrid; grid-column-start:span 3; margin-right: 9px;">
        <x style="grid-column: 1;">x</x>
      </div>
    </div>
</div>

<div class="grid">
  <n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n><n></n>
    <div style="grid-template-columns: subgrid;">
      <div style="grid-template-columns: subgrid; grid-column-start:span 3; margin: 0 20px 0 0; margin-right: 49px;">
        <x style="grid-column: 1;">x</x>
      </div>
    </div>
</div>

</body>
</html>