-
Notifications
You must be signed in to change notification settings - Fork 3
/
test.html
129 lines (108 loc) · 3.08 KB
/
test.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
124
125
126
127
128
129
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Opinionate CSS: UI tests</title>
<script src="https://rawgit.com/aFarkas/html5shiv/gh-pages/dist/html5shiv.min.js"></script>
<link rel="stylesheet" href="opinionate.css">
<style>
/*! suit-test v0.1.0 | MIT License | github.com/suitcss */
.Test {
background: #fff;
counter-reset: test-describe;
}
.Test-describe:before {
content: counter(test-describe);
counter-increment: test-describe;
}
.Test-describe {
counter-reset: test-it;
}
.Test-it:before {
content: counter(test-describe) "." counter(test-it);
counter-increment: test-it;
}
.Test-title {
font-size: 2em;
font-family: sans-serif;
padding: 20px;
margin: 20px 0;
background: #eee;
color: #999;
}
.Test-describe,
.Test-it {
background: #eee;
border-left: 5px solid #666;
color: #666;
font-family: sans-serif;
font-weight: bold;
margin: 20px 0;
padding: 0.75em 20px;
}
.Test-describe {
font-size: 1.5em;
margin: 60px 0 20px;
}
.Test-describe:before,
.Test-it:before {
color: #999;
display: inline-block;
margin-right: 10px;
min-width: 30px;
text-transform: uppercase;
}
/* Custom helpers */
/**
* Test whether the body's margin has been removed
*/
body {
background: red;
}
/**
* Highlight the bounds of direct children of a test block
*/
.Test-run--highlightEl > * {
outline: 1px solid #ADD8E6;
}
</style>
<div class="Test">
.
<h1 class="Test-title"><a href="https://github.com/necolas/normalize.css">Opinionate.css</a>: UI tests</h1>
<h2 class="Test-describe"><code>html</code></h2>
<h3 class="Test-it">should have sans-serif font family</h3>
<div class="Test-run">
abcdefghijklmnopqrstuvwxyz
</div>
<h2 class="Test-describe"><code>body</code></h2>
<h3 class="Test-it">should have no margin</h3>
<div class="Test-run">
(there should be no red background visible on this page)
</div>
<h2 class="Test-describe"><code>a</code></h2>
<h3 class="Test-it">should not have a focus outline when both focused and hovered</h3>
<div class="Test-run">
<a href="#non">dummy anchor</a>
</div>
<!-- KEEP -->
<h2 class="Test-describe"><code>button</code>, <code>input</code>, <code>optgroup</code>, <code>select</code>, <code>textarea</code></h2>
<h3 class="Test-it">should inherit <code>font-size</code> from ancestor</h3>
<div class="Test-run" style="font-size: 20px;">
<button>button</button><br>
<input value="input"><br>
<select style="border:1px solid #999;">
<optgroup label="optgroup">
<option>option</option>
</optgroup>
<option>option</option>
</select><br>
<textarea>textarea</textarea>
</div>
<h2 class="Test-describe"><code>fieldset</code></h2>
<h3 class="Test-it">should have consistent border, padding, and margin</h3>
<div class="Test-run">
<fieldset>
<div style="width:100%; height:100px; background:#ADD8E6;"></div>
</fieldset>
</div>
</div>