summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-values/absolute_length_units.html
blob: 7528bbbbd4965507719093db7e18784bb20d6858 (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
<!DOCTYPE html>
<html>
<!-- Submitted from TestTWF Paris -->
<head>

  <meta charset="UTF-8">

  <title>CSS Values and Units Test: elements should be the real world size given in mm, cm, inches...</title>
  <link rel="author" title="Marc Bourlon" href="mailto:marc@bourlon.com">
  <link rel="help" href="https://www.w3.org/TR/css3-values/#absolute-lengths" title="5.2 Absolute lengths: the cm, mm, Q, in, pt, pc, px units">

  <style type="text/css">

    .s1mm { background-color: fuchsia; width: 1mm; height: 1mm; }
    .s10mm { background-color: olive; width: 10mm; height: 10mm; }
    .s1cm { background-color: orange; width: 1cm; height: 1cm; }
    .s254cm { background-color: gray; width: 2.54cm; height: 2.54cm; }
    .s1in { background-color: blue; width: 1in; height: 1in; }

    .inline { float: left; }

    .newline { clear: left; }

    p { clear: both; margin: 10px 0; }

  </style>

</head>
<body>

<p>
  There should be a 1mm (width) by 1mm (height) fuchsia square:
</p>

<div class="s1mm"></div>

<p>
  There should be a 10mm (width) by 1mm (height) fuchsia stripe:
</p>

<div class="s1mm newline inline"></div>
<div class="s1mm inline"></div>
<div class="s1mm inline"></div>
<div class="s1mm inline"></div>
<div class="s1mm inline"></div>
<div class="s1mm inline"></div>
<div class="s1mm inline"></div>
<div class="s1mm inline"></div>
<div class="s1mm inline"></div>
<div class="s1mm inline"></div>

<p>
  There should be a 10mm (width) by 10mm (height) olive square:
</p>

<div class="s10mm newline "></div>

<p>
  There should be a 1cm (width) by 1cm (height) orange square. So, same width above:
</p>

<div class="s1cm newline "></div>

<p>
  There should be a 2.54cm (width) by 2.54cm (height) gray square:
</p>

<div class="s254cm newline "></div>

<p>
  There should be a 1in (width) by 1in (height) blue square. So, same width as above:
</p>

<div class="s1in"></div>

</body>
</html>