summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-writing-modes/box-offsets-rel-pos-vlr-003.xht
blob: 91cbc32245509abfc03345a83b6ccb1167404b9f (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

 <head>

  <title>CSS Writing Modes Test: box offsets - position relative</title>

  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
  <link rel="help" title="7.1 Principles of Layout in Vertical Writing Modes" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" />
  <link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />

  <meta content="image" name="flags" />
  <meta content="The 'top', 'right', 'bottom', 'left' property, for relative positioning, specify the offset of the box itself from its normal in-flow position, from the position it would have had if it had been static. The 'top', 'right', 'bottom', 'left' offset property are physical properties, not logical ones in vertical writing-modes." name="assert" />

  <style type="text/css"><![CDATA[
  html
    {
      writing-mode: vertical-lr;
    }

  img
    {
      position: relative;
    }

  img.moves-toward-left
    {
      right: 80px;
    }

  img.moves-toward-top
    {
      bottom: 80px;
    }

  img.moves-toward-right
    {
      left: 80px;
    }

  img.moves-toward-bottom
    {
      top: 80px;
    }

  /*
  In this testcase, 7 red 80px by 80px squares overlap
  another red 80px by 80px square (placed in the center of
  a 3 by 3 grid of squares) and then, at the end, one single
  green 80px by 80px square overlaps all 8 other red squares.
  */
  ]]></style>

 </head>

 <body>

  <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>

  <div><img class="moves-toward-bottom moves-toward-right" src="support/100x100-red.png" width="80" height="80" alt="Image download support must be enabled" /><img class="moves-toward-right" src="support/100x100-red.png" width="80" height="80" alt="Image download support must be enabled" /><img class="moves-toward-right moves-toward-top" src="support/100x100-red.png" width="80" height="80" alt="Image download support must be enabled" /></div>

  <div><img class="moves-toward-bottom" src="support/100x100-red.png" width="80" height="80" alt="Image download support must be enabled" /><img src="support/100x100-red.png" width="80" height="80" alt="Image download support must be enabled" /><img class="moves-toward-top" src="support/100x100-red.png" width="80" height="80" alt="Image download support must be enabled" /></div>

  <div><img class="moves-toward-left moves-toward-bottom" src="support/100x100-red.png" width="80" height="80" alt="Image download support must be enabled" /><img class="moves-toward-left" src="support/100x100-red.png" width="80" height="80" alt="Image download support must be enabled" /><img class="moves-toward-left moves-toward-top" src="support/swatch-green.png" width="80" height="80" alt="Image download support must be enabled" /></div>

 </body>
</html>