Debian Codegraph @

test.html

raw ◀ ▶
Source reconstructed at patch state 4 of 5 — not the installed (fully patched) source.
5 Debian patches touch this file
1 <!DOCTYPE html>
2 <html lang="en" dir="ltr">
3 <head>
4 <meta name="viewport" content="width=device-width,initial-scale=1" />
5 <title>Normalize CSS: UI tests</title>
6 <script src="../../../javascript/html5shiv/html5shiv.min.js" type="javascript"></script>
7 <script src="file:///usr/share/javascript/html5shiv/html5shiv.min.js" type="javascript"></script>
8 <link rel="stylesheet" href="normalize.css" />
9 <style type="text/css">
10 /*! suit-test v0.1.0 | MIT License | github.com/suitcss */
11
12 .Test {
13 background: #fff;
14 counter-reset: test-describe;
15 }
16
17 .Test-describe:before {
18 content: counter(test-describe);
19 counter-increment: test-describe;
20 }
21
22 .Test-describe {
23 counter-reset: test-it;
24 }
25
26 .Test-it:before {
27 content: counter(test-describe) "." counter(test-it);
28 counter-increment: test-it;
29 }
30
31 .Test-title {
32 font-size: 2em;
33 font-family: sans-serif;
34 padding: 20px;
35 margin: 20px 0;
36 background: #eee;
37 color: #999;
38 }
39
40 .Test-describe,
41 .Test-it {
42 background: #eee;
43 border-left: 5px solid #666;
44 color: #666;
45 font-family: sans-serif;
46 font-weight: bold;
47 margin: 20px 0;
48 padding: 0.75em 20px;
49 }
50
51 .Test-describe {
52 font-size: 1.5em;
53 margin: 60px 0 20px;
54 }
55
56 .Test-describe:before,
57 .Test-it:before {
58 color: #999;
59 display: inline-block;
60 margin-right: 10px;
61 min-width: 30px;
62 text-transform: uppercase;
63 }
64
65 /* Custom helpers */
66
67 /**
68 * Test whether the body's margin has been removed
69 */
70
71 body {
72 background: red;
73 }
74
75 /**
76 * Highlight the bounds of direct children of a test block
77 */
78
79 .Test-run--highlightEl > * {
80 outline: 1px solid #ADD8E6;
81 }
82 </style>
83 </head>
84 <body>
85 <div class="Test">
86 .
87
88 <h1 class="Test-title"><a href="https://github.com/necolas/normalize.css">Normalize.css</a>: UI tests</h1>
89
90 <h2 class="Test-describe"><code>html</code></h2>
91 <h3 class="Test-it">should have a line height of 1.15</h3>
92 <div class="Test-run">
93 abcdefghijklmnopqrstuvwxyz
94 </div>
95
96 <h2 class="Test-describe"><code>body</code></h2>
97 <h3 class="Test-it">should have no margin (opinionated)</h3>
98 <div class="Test-run">
99 (there should be no red background visible on this page)
100 </div>
101
102 <h2 class="Test-describe">
103 <code>article</code>, <code>aside</code>, <code>details</code>,
104 <code>figure</code>, <code>figcaption</code>, <code>footer</code>,
105 <code>header</code>, <code>main</code>,
106 <code>menu</code>, <code>nav</code>, <code>section</code>,
107 <code>summary</code>
108 </h2>
109 <h3 class="Test-it">should render as block</h3>
110 <div class="Test-run Test-run--highlightEl">
111 <article>article</article>
112 <aside>aside</aside>
113 <details>
114 <summary>summary</summary>
115 details
116 </details>
117 <figure>
118 figure
119 <figcaption>figcaption</figcaption>
120 </figure>
121 <footer>footer</footer>
122 <header>header</header>
123 <main>main</main>
124 <menu><li>menu</li></menu>
125 <nav>nav</nav>
126 <section>section</section>
127 </div>
128
129 <h2 class="Test-describe"><code>audio</code>, <code>canvas</code>, <code>progress</code>, <code>video</code></h2>
130 <h3 class="Test-it">should render as inline-block and baseline-aligned</h3>
131 <div class="Test-run Test-run--highlightEl">
132 <audio controls>audio</audio>
133 <canvas>canvas</canvas>
134 <progress>progress</progress>
135 <video controls>video</video>
136 </div>
137
138 <h2 class="Test-describe"><code>audio:not([controls])</code>, <code>template</code>, <code>[hidden]</code></h2>
139 <h3 class="Test-it">should not display</h3>
140 <div class="Test-run Test-run--highlightEl">
141 <audio>audio</audio>
142 <template>
143 <h1>{{title}}</h1>
144 </template>
145 <p hidden="hidden">This should be hidden</p>
146 </div>
147
148 <h2 class="Test-describe"><code>a</code></h2>
149 <h3 class="Test-it">should have a transparent background when active</h3>
150 <div class="Test-run">
151 <a href="#non">dummy anchor</a>
152 </div>
153 <h3 class="Test-it">should not skip underlines</h3>
154 <div class="Test-run">
155 <a href="#non">quip and jig</a>
156 </div>
157 <h3 class="Test-it">should not have a focus outline when both focused and hovered (opinionated)</h3>
158 <div class="Test-run">
159 <a href="#non">dummy anchor</a>
160 </div>
161
162 <h2 class="Test-describe"><code>abbr[title]</code></h2>
163 <h3 class="Test-it">should have a dotted underline with a solid underline as a fallback</h3>
164 <div class="Test-run">
165 <abbr title="abbreviation">abbr</abbr>
166 </div>
167
168 <h2 class="Test-describe"><code>b</code>, <code>strong</code></h2>
169 <h3 class="Test-it">should have bolder font-weight</h3>
170 <div class="Test-run">
171 <b>b</b>
172 <strong>strong</strong>
173 </div>
174
175 <h2 class="Test-describe"><code>dfn</code></h2>
176 <h3 class="Test-it">should have italic font-style</h3>
177 <div class="Test-run">
178 <dfn>dfn</dfn>
179 </div>
180
181 <h2 class="Test-describe"><code>h1</code></h2>
182 <h3 class="Test-it">should not change size within an <code>article</code></h3>
183 <div class="Test-run">
184 <h1>Heading (control)</h1>
185 <article>
186 <h1>Heading (in article)</h1>
187 </article>
188 </div>
189 <h3 class="Test-it">should not change size within a <code>section</code></h3>
190 <div class="Test-run">
191 <h1>Heading (control)</h1>
192 <section>
193 <h1>Heading (in section)</h1>
194 </section>
195 </div>
196
197 <h2 class="Test-describe"><code>mark</code></h2>
198 <h3 class="Test-it">should have a yellow background</h3>
199 <div class="Test-run">
200 <mark>mark</mark>
201 </div>
202
203 <h2 class="Test-describe"><code>small</code></h2>
204 <h3 class="Test-it">should render equally small in all browsers</h3>
205 <div class="Test-run">
206 control. <small>small.</small>
207 </div>
208
209 <h2 class="Test-describe"><code>sub</code> and <code>sup</code></h2>
210 <h3 class="Test-it">should not affect a line's visual line-height</h3>
211 <div class="Test-run Test-run--highlightEl">
212 <p>control.</p>
213 <p>control. <sub>sub.</sub></p>
214 <p>control. <sup>sup.</sup></p>
215 </div>
216
217 <h2 class="Test-describe"><code>img</code></h2>
218 <h3 class="Test-it">should not have a border when wrapped in an anchor</h3>
219 <div class="Test-run">
220 <a href="#non">
221 <!-- scaled-up 1px image -->
222 <img style="background-color:#ADD8E6" src="overwritenbyjs.png" width="100" height="100" id="onepixel1" />
223 </a>
224 </div>
225
226 <h2 class="Test-describe"><code>svg</code></h2>
227 <h3 class="Test-it">should not overflow</h3>
228 <div class="Test-run Test-run--highlightEl">
229 <svg width="100" height="100">
230 <circle cx="100" cy="100" r="100" fill="#ADD8E6" />
231 </svg>
232 </div>
233
234 <h2 class="Test-describe"><code>code</code>, <code>kbd</code>, <code>pre</code>, <code>samp</code></h2>
235 <h3 class="Test-it">should render text at the same absolute size as normal text</h3>
236 <div class="Test-run">
237 <span>span: abcdefghijklmnopqrstuvwxyz.</span><br />
238 <code>code: abcdefghijklmnopqrstuvwxyz.</code><br />
239 <kbd>kbd: abcdefghijklmnopqrstuvwxyz.</kbd><br />
240 <samp>samp: abcdefghijklmnopqrstuvwxyz.</samp>
241 <pre>pre: abcdefghijklmnopqrstuvwxyz.</pre>
242 </div>
243
244 <h2 class="Test-describe"><code>figure</code></h2>
245 <h3 class="Test-it">should have margins</h3>
246 <div class="Test-run" style="outline:1px solid #ADD8E6; overflow:hidden;">
247 <figure>
248 <img style="background-color:#ADD8E6" src="overwrittenbyjs.png" width="400" height="200" id="onepixel2" />
249 </figure>
250 </div>
251
252 <h2 class="Test-describe"><code>hr</code></h2>
253 <h3 class="Test-it">should have a <code>content-box</code> box model</h3>
254 <div class="Test-run" style="">
255 <hr style="height:2px; border:solid #ADD8E6; border-width:2px 0;" />
256 </div>
257
258 <h2 class="Test-describe"><code>button</code>, <code>input</code>, <code>optgroup</code>, <code>select</code>, <code>textarea</code></h2>
259 <h3 class="Test-it">should inherit <code>font-size</code> from ancestor</h3>
260 <div class="Test-run" style="font-size: 20px;">
261 <button>button</button><br />
262 <input value="input" /><br />
263 <select style="border:1px solid #999;">
264 <optgroup label="optgroup">
265 <option>option</option>
266 </optgroup>
267 <option>option</option>
268 </select><br />
269 <textarea cols="30" rows="5">textarea</textarea>
270 </div>
271 <h3 class="Test-it">should not have margins</h3>
272 <div class="Test-run" id="form-collection-margins">
273 <style type="text/css">
274 #form-collection-margins {
275 outline: 1px solid #ADD8E6;
276 overflow: hidden;
277 }
278
279 #form-collection-margins button,
280 #form-collection-margins input,
281 #form-collection-margins select,
282 #form-collection-margins textarea {
283 display: block;
284 }
285 </style>
286 <button>button</button>
287 <input value="input" />
288 <select style="border:1px solid #999;">
289 <optgroup label="optgroup">
290 <option>option</option>
291 </optgroup>
292 <option>option</option>
293 </select>
294 <textarea cols="30" rows="5">textarea</textarea>
295 </div>
296
297 <h2 class="Test-describe"><code>button</code></h2>
298 <h3 class="Test-it">should have visible overflow</h3>
299 <div class="Test-run" id="button-overflow">
300 <style type="text/css">
301 #button-overflow button:after {
302 content: "";
303 background: #ADD8E6;
304 display: inline-block;
305 height: 10px;
306 position:relative;
307 right: -20px;
308 width: 10px;
309 }
310 </style>
311 <button>abcdefghijklmnopqrstuvwxyz</button>
312 </div>
313
314 <h2 class="Test-describe"><code>button</code>, <code>select</code></h2>
315 <h3 class="Test-it">should not inherit <code>text-transform</code></h3>
316 <div class="Test-run" style="text-transform:uppercase">
317 <button>button</button>
318 <select><option>option</option></select>
319 </div>
320
321 <h2 class="Test-describe"><code>button</code> and button-style <code>input</code></h2>
322 <h3 class="Test-it">should be styleable</h3>
323 <div class="Test-run" id="button-like-style">
324 <style type="text/css">
325 #button-like-style button,
326 #button-like-style input {
327 background: #ADD8E6;
328 border: 2px solid black;
329 border-radius: 2px;
330 padding: 5px;
331 }
332 </style>
333 <p><button>button</button></p>
334 <p><input type="image" src="test.svg" alt="input (image)" /></p>
335 <p><input type="button" value="input (button)" /></p>
336 <p><input type="file" value="input (file)" /></p>
337 <p><input type="reset" value="input (reset)" /></p>
338 <p><input type="submit" value="input (submit)" /></p>
339 </div>
340
341 <h2 class="Test-describe">disabled <code>button</code> and <code>input</code></h2>
342 <h3 class="Test-it">should have <code>default</code> cursor style</h3>
343 <div class="Test-run">
344 <p><button disabled="disabled">button</button></p>
345 <p><input disabled="disabled" type="button" value="input (button)" /></p>
346 <p><input disabled="disabled" type="reset" value="input (reset)" /></p>
347 <p><input disabled="disabled" type="submit" value="input (submit)" /></p>
348 </div>
349
350 <h2 class="Test-describe"><code>button</code>, <code>input</code></h2>
351 <h3 class="Test-it">should not have extra inner padding in Firefox</h3>
352 <div class="Test-run" id="button-input-padding">
353 <style type="text/css">
354 #button-input-padding button,
355 #button-input-padding input {
356 border: 0;
357 padding: 0;
358 outline: 1px solid #ADD8E6;
359 }
360 </style>
361 <p><button>button</button></p>
362 <p><input type="button" value="input (button)" /></p>
363 <p><input type="reset" value="input (reset)" /></p>
364 <p><input type="submit" value="input (submit)" /></p>
365 </div>
366
367 <h2 class="Test-describe"><code>fieldset</code></h2>
368 <h3 class="Test-it">should have consistent border, padding, and margin</h3>
369 <div class="Test-run">
370 <fieldset>
371 <div style="width:100%; height:100px; background:#ADD8E6;"></div>
372 </fieldset>
373 </div>
374
375 <h2 class="Test-describe"><code>legend</code></h2>
376 <h3 class="Test-it">should inherit color</h3>
377 <div class="Test-run" style="color:#ADD8E6;">
378 <fieldset>
379 <legend>legend</legend>
380 </fieldset>
381 </div>
382 <h3 class="Test-it">should not have padding</h3>
383 <div class="Test-run">
384 <fieldset>
385 <legend>legend</legend>
386 </fieldset>
387 </div>
388 <h3 class="Test-it">should wrap text</h3>
389 <div class="Test-run">
390 <fieldset>
391 <legend>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et me.</legend>
392 </fieldset>
393 </div>
394
395 <h2 class="Test-describe"><code>textarea</code></h2>
396 <h3 class="Test-it">should not have a scrollbar unless overflowing</h3>
397 <div class="Test-run">
398 <textarea cols="30" rows="5">textarea</textarea>
399 </div>
400
401 <h2 class="Test-describe"><code>[type="checkbox"]</code>, <code>[type="radio"]</code></h2>
402 <h3 class="Test-it">should have a <code>border-box</code> box model</h3>
403 <div class="Test-run Test-run--highlightEl" id="radio-box-model">
404 <style type="text/css">
405 #radio-box-model {
406 width: 200px;
407 border: 1px solid red;
408 }
409
410 #radio-box-model input {
411 width: 100%;
412 border: 5px solid #ADD8E6;
413 display: block;
414 position: relative;
415 }
416 </style>
417 <input type="checkbox" />
418 <input type="radio" name="rad" />
419 </div>
420 <h3 class="Test-it">should not have padding</h3>
421 <div class="Test-run Test-run--highlightEl">
422 <input type="checkbox" />
423 <input type="radio" name="rad" />
424 </div>
425
426 <h2 class="Test-describe"><code>[type="number"]</code></h2>
427 <h3 class="Test-it">should display a default cursor for the decrement button's click target in Chrome</h3>
428 <div class="Test-run">
429 <input style="height:50px; font-size:15px;" type="number" id="in" min="0" max="10" value="5" />
430 </div>
431
432 <h2 class="Test-describe"><code>[type="search"]</code></h2>
433 <h3 class="Test-it">should be styleable</h3>
434 <div class="Test-run">
435 <input type="search" style="border:1px solid #ADD8E6; padding:10px; width:200px;" />
436 </div>
437 <h3 class="Test-it">should reference inherited color</h3>
438 <div class="Test-run">
439 <input type="text" placeholder="Text goes here" style="background-color: black; color: orange;" />
440 </div>
441
442 </div>
443 <script type="javascript">
444 var canvas = document.createElement('canvas');
445 if (!canvas.getContext) G_vmlCanvasManager.initElement(canvas);
446
447 var ctx = canvas.getContext('2d');
448 canvas.width = 1;
449 canvas.height = 1;
450 function createPixel(r, g, b, a) {
451 ctx.fillStyle = 'rgba(' + [r,g,b,a].join() + ')';
452 ctx.fillRect(0,0,1,1);
453 return canvas.toDataURL('image/png','');
454 }
455 document.getElementById("onepixel1").setAttribute("src",createPixel(255,0,0,0));
456 document.getElementById("onepixel2").setAttribute("src",createPixel(255,0,0,0));
457 </script>
458 </body>
459 </html>