summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/abspos/position-absolute-003.html
blob: a858bac9fcb0a452f2893b406808e9dca1b1751a (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>
<title>CSS Test: Absolutely positioned children of flexboxes</title>
<link rel="author" title="Google Inc." href="http://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#abspos-items">
<meta name="flags" content="dom">
<meta name="assert" content="Checks that we correctly handle border and
padding in combination with abspos items">
<style>
.rect {
  position: absolute;
  width: 50px;
  height: 50px;
  background-color: green;
}

.flexbox {
  position: relative;
  width: 100px;
  height: 100px;
  outline: 3px solid black;
}
</style>

<link rel="stylesheet" href="../support/flexbox.css">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>

<body onload="checkLayout('.rect')">
<div id=log></div>

<div class="flexbox" style="padding-top: 10px; padding-left: 20px;">
  <div class="rect" data-offset-x="20" data-offset-y="10"></div>
</div>

<div class="flexbox column" style="padding-top: 10px; padding-left: 20px;">
  <div class="rect" data-offset-x="20" data-offset-y="10"></div>
</div>

<div class="flexbox" style="writing-mode: vertical-lr; padding-top: 10px; padding-left: 20px;">
  <div class="rect" data-offset-x="20" data-offset-y="10"></div>
</div>

<div class="flexbox column" style="writing-mode: vertical-lr; padding-top: 10px; padding-left: 20px;">
  <div class="rect" data-offset-x="20" data-offset-y="10"></div>
</div>

<div class="flexbox" style="direction: rtl; padding-top: 10px; padding-right: 20px;">
  <div class="rect" data-offset-x="50" data-offset-y="10"></div>
</div>

<div class="flexbox column" style="direction: rtl; padding-top: 10px; padding-right: 20px;">
  <div class="rect" data-offset-x="50" data-offset-y="10"></div>
</div>

<div class="flexbox" style="direction: rtl; writing-mode: vertical-lr; padding-bottom: 10px; padding-left: 20px;">
  <div class="rect" data-offset-x="20" data-offset-y="50"></div>
</div>

<div class="flexbox column" style="direction: rtl; writing-mode: vertical-lr; padding-bottom: 10px; padding-left: 20px;">
  <div class="rect" data-offset-x="20" data-offset-y="50"></div>
</div>

<hr>
<div class="flexbox" style="border-top: 10px solid; border-left: 20px solid;">
  <div class="rect" data-offset-x="0" data-offset-y="0"></div>
</div>

<div class="flexbox column" style="border-top: 10px solid; border-left: 20px solid;">
  <div class="rect" data-offset-x="0" data-offset-y="0"></div>
</div>

<div class="flexbox" style="writing-mode: vertical-lr; border-top: 10px solid; border-left: 20px solid;">
  <div class="rect" data-offset-x="0" data-offset-y="0"></div>
</div>

<div class="flexbox column" style="writing-mode: vertical-lr; border-top: 10px solid; border-left: 20px solid;">
  <div class="rect" data-offset-x="0" data-offset-y="0"></div>
</div>

<div class="flexbox" style="direction: rtl; border-top: 10px solid; border-right: 20px solid;">
  <div class="rect" data-offset-x="50" data-offset-y="0"></div>
</div>

<div class="flexbox column" style="direction: rtl; border-top: 10px solid; border-right: 20px solid;">
  <div class="rect" data-offset-x="50" data-offset-y="0"></div>
</div>

<div class="flexbox" style="direction: rtl; writing-mode: vertical-lr; border-bottom: 10px solid; border-left: 20px solid;">
  <div class="rect" data-offset-x="0" data-offset-y="50"></div>
</div>

<div class="flexbox column" style="direction: rtl; writing-mode: vertical-lr; border-bottom: 10px solid; border-left: 20px solid;">
  <div class="rect" data-offset-x="0" data-offset-y="50"></div>
</div>