summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-safe-001.html
blob: 58ccaaf01df32c286f2c7d20890e77182a354eff (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>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<head>
  <meta charset="utf-8">
  <title>CSS Test: Testing safe overflow-position for align-self and justify-self in absolutely positioned boxes in grid containers in both horizontal and vertical writing modes</title>
  <link rel="author" title="Mihir Iyer" href="mailto:miyer@mozilla.com">
  <link rel="help" href="https://drafts.csswg.org/css-flexbox/#abspos-items">
  <link rel="match" href="grid-abspos-staticpos-align-self-safe-001-ref.html">
  <style>
    .container {
      display: grid;
      padding: 2px 1px;
      border: 1px solid black;
      background: yellow;
      margin-bottom: 5px;
      margin-right: 5px;
      float: left; /* For testing in "rows" of containers */
      position: relative;
      width: 30px;
      height: 25px;
      grid: 3px 14px 3px / 2px 20px 2px;
    }
    br { clear: both }
    .container > * {
      position: absolute;
      grid-area: 2 / 2 / 3 / 3;
      background: teal;
      width: 21px;
      height: 21px;
      justify-self: safe end;
      align-self: safe center;
    }
    .vertRL {
      writing-mode: vertical-rl;
    }
    .relPos {
      position: relative;
    }
    .relPos > * {
      height: 35px;
      width: 33px;
    }
  </style>
</head>
<body>
  <div class="container vertRL"><div></div></div>
  <div class="container"><div></div></div>
  <div class="container relPos vertRL"><div></div></div>
  <div class="container relPos"><div></div></div>
</body>
</html>