-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
index.html
123 lines (119 loc) · 3.87 KB
/
index.html
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<title>verge viewport library test suite</title>
<meta name=viewport content="width=device-width, initial-scale=1">
<style>
html { font-family:sans-serif; background:#fdf6e3; color:#586e75; font-size:1em }
body { margin:1em auto; max-width:100%; width:94%; }
a:link, a:visited { color:#268bd2 }
code .number { color:#b58900 }
pre, td, th { padding:1em;text-align:left; border:1px dotted #93a1a1 }
th { font-weight:bold; }
td { color:#2aa198 }
td:first-child { font-weight:normal;color:#586e75 }
td:last-child { color:#dc322f; }
pre { padding:1em; background:#073642; color:#93a1a1 }
</style>
<script src="beyond.js"></script>
<script src="verge.js"></script>
<script src="test.js"></script>
</head>
<body>
<div>
<h1><a href="http://github.com/ryanve/verge">verge</a> viewport suite</h1>
</div>
<pre id="ua"></pre>
<div id="a"><pre><code>div#a</code></pre></div>
<table id=tests>
<tr>
<th scope="col"><a href=#tests accesskey=s>test<br>code</a></th>
<th scope="col"><a href=#tests>expected<br>type</a></th>
<th scope="col"><a href=#tests>live<br>output</a></th>
</tr>
<tr>
<td><code>$<wbr>.inViewport(a, <span class=number>-100</span>)</code></td>
<td><code>boolean</code></td>
<td><code id="in-viewport-a-neg"></code></td>
</tr>
<tr>
<td><code>$<wbr>.inViewport(a)</code></td>
<td><code>boolean</code></td>
<td><code id="in-viewport-a"></code></td>
</tr>
<tr>
<td><code>$<wbr>.inViewport(a, <span class=number>100</span>)</code></td>
<td><code>boolean</code></td>
<td><code id="in-viewport-a-pos"></code></td>
</tr>
<tr>
<td><code>$<wbr>.viewportW()</code></td>
<td><code>number</code></td>
<td><code id="viewport-w"></code></td>
</tr>
<tr>
<td><code>$<wbr>.viewportH()</code></td>
<td><code>number</code></td>
<td><code id="viewport-h"></code></td>
</tr>
<tr>
<td><code>$<wbr>.scrollX()</code></td>
<td><code>number</code></td>
<td><code id="scroll-x"></code></td>
</tr>
<tr>
<td><code>$<wbr>.scrollY()</code></td>
<td><code>number</code></td>
<td><code id="scroll-y"></code></td>
</tr>
<tr>
<td><code>$<wbr>.rectangle(a)<wbr>.top</code></td>
<td><code>number</code></td>
<td><code id="rectangle-top"></code></td>
</tr>
<tr>
<td><code>$<wbr>.rectangle(a)<wbr>.bottom</code></td>
<td><code>number</code></td>
<td><code id="rectangle-bottom"></code></td>
</tr>
<tr>
<td><code>$<wbr>.rectangle(a)<wbr>.left</code></td>
<td><code>number</code></td>
<td><code id="rectangle-left"></code></td>
</tr>
<tr>
<td><code>$<wbr>.rectangle(a)<wbr>.right</code></td>
<td><code>number</code></td>
<td><code id="rectangle-right"></code></td>
</tr>
<tr>
<td><code>$<wbr>.rectangle(a)<wbr>.width</code></td>
<td><code>number</code></td>
<td><code id="rectangle-width"></code></td>
</tr>
<tr>
<td><code>$<wbr>.rectangle(a)<wbr>.height</code></td>
<td><code>number</code></td>
<td><code id="rectangle-height"></code></td>
</tr>
<tr>
<td><code>$<wbr>.inViewport(b, <span class=number>100</span>)</code></td>
<td><code>boolean</code></td>
<td><code id="in-viewport-b-pos"></code></td>
</tr>
<tr>
<td><code>$<wbr>.inViewport(b)</code></td>
<td><code>boolean</code></td>
<td><code id="in-viewport-b"></code></td>
</tr>
<tr>
<td><code>$<wbr>.inViewport(b, <span class=number>-100</span>)</code></td>
<td><code>boolean</code></td>
<td><code id="in-viewport-b-neg"></code></td>
</tr>
</table>
<div id="b"><pre><code>div#b</code></pre></div>
<div id="c"><pre><code>div#c</code></pre></div>
</body>
</html>