summaryrefslogtreecommitdiffstats
path: root/layout/reftests/pixel-rounding/viewport-units-rounding-1-frame.html
blob: 955b873dd6dfff500452e17a299ea4dd21b10aa9 (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
<!DOCTYPE HTML>
<title>subframe for test of viewport units rounding</title>
<meta charset="UTF-8">
<style>

html, body { margin: 0; padding: 0; border: none }

body > div {
  background: red; /* should never show */
  overflow: hidden; /* block formatting context */
}

body > div > div {
  float: left;
  height: 10px;
}

body > div.w25 > div { width: 25vw; }

</style>

<div class="w25">
  <div style="background: fuchsia"></div>
  <div style="background: aqua"></div>
  <div style="background: silver"></div>
  <div style="background: yellow"></div>
</div>

<!--
  Really, though, anything that is a multiple of 5vw will always
  produce a round number of appunits when starting from an integer
  number of pixels, since 5vw is 1/20 of the viewport.

  So, more interesting:
-->

<div>
  <div style="width: 24vw; background: fuchsia"></div>
  <div style="width: 24vw; background: aqua"></div>
  <div style="width: 24vw; background: silver"></div>
  <div style="width: 24vw; background: yellow"></div>
  <div style="width: 4vw; background: gray"></div>
</div>

<div>
  <div style="width: 21vw; background: fuchsia"></div>
  <div style="width: 21vw; background: aqua"></div>
  <div style="width: 21vw; background: silver"></div>
  <div style="width: 21vw; background: yellow"></div>
  <div style="width: 16vw; background: gray"></div>
</div>