Debian Codegraph @

closure-library/closure/goog/style/style_quirks_test.html

raw
1 <!-- BackCompat -->
2 <!--
3
4 This is a copy of style_test.html but without a doctype. Make sure these two
5 are in sync.
6
7 -->
8 <html>
9 <!--
10 Copyright 2006 The Closure Library Authors. All Rights Reserved.
11
12 Use of this source code is governed by the Apache License, Version 2.0.
13 See the COPYING file for details.
14 -->
15 <head>
16 <meta name="viewport" content="width=device-width, initial-scale=1.0,
17 maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
18 <meta charset="UTF-8" />
19 <title>Closure Unit Tests - goog.dom.style</title>
20 <script src="../base.js"></script>
21 <script>goog.require('goog.userAgent');</script>
22 <style>
23
24 * {
25 box-sizing: border-box;
26 -moz-box-sizing: border-box;
27 -webkit-box-sizing: border-box;
28 }
29
30 </style>
31 <style>
32
33 i {
34 font-family: Times, sans-serif;
35 font-size: 5em;
36 }
37
38 #testEl5 {
39 display: none;
40 }
41
42 #styleTest1 {
43 width: 120px;
44 text-decoration: underline;
45 }
46
47 #bgcolorTest0 {
48 background-color: #f00;
49 }
50
51 #bgcolorTest1 {
52 background-color: #ff0000;
53 }
54
55 #bgcolorTest2 {
56 background-color: rgb(255, 0, 0);
57 }
58
59 #bgcolorTest3 {
60 background-color: rgb(100%, 0%, 0%);
61 }
62
63 #bgcolorTest5 {
64 background-color: lightblue;
65 }
66
67 #bgcolorTest6 {
68 background-color: inherit;
69 }
70
71 #bgcolorTest7 {
72 background-color: transparent;
73 }
74
75 .rtl {
76 direction: rtl;
77 }
78
79 .ltr {
80 direction: ltr;
81 }
82
83 #pos-scroll-abs {
84 position: absolute;
85 top: 200px;
86 left: 100px;
87 }
88
89 #pos-scroll-abs-1 {
90 overflow: scroll;
91 width: 100px;
92 height: 100px;
93 }
94
95 #pos-scroll-abs-2 {
96 position: absolute;
97 top: 100px;
98 left: 100px;
99 width: 500px;
100 background-color: pink;
101 }
102
103 #abs-upper-left {
104 position: absolute;
105 top: 0px;
106 left: 0px;
107 }
108
109 #no-text-font-styles {
110 font-family: "Helvetica", Times, serif;
111 font-size: 30px;
112 }
113
114 .century {
115 font-family: "Comic Sans MS", "Century Schoolbook L", serif;
116 }
117
118 #size-a,
119 #size-e {
120 width: 100px;
121 height: 100px;
122 background: red;
123 padding: 0;
124 border-style: solid;
125 border-color: black;
126 border-width: 0;
127 }
128
129 #size-b {
130 width: 100px;
131 height: 100px;
132 background: red;
133 border: 10px solid black;
134 }
135
136 #size-c {
137 width: 100px;
138 height: 100px;
139 background: red;
140 border: 10px solid black;
141 padding: 10px;
142 overflow: auto;
143 }
144
145 #size-d {
146 width: 10em;
147 height: 2cm;
148 background: red;
149 border: thick solid black;
150 padding: 2mm;
151 }
152
153 #size-f {
154 border-width: 0;
155 margin: 0;
156 padding: 0;
157 }
158
159 #css-position-absolute {
160 position: absolute;
161 }
162
163 #css-overflow-hidden {
164 overflow: hidden;
165 }
166
167 #css-z-index-200 {
168 position:relative;
169 z-index: 200;
170 }
171
172 #css-text-align-center {
173 text-align: center;
174 }
175
176 #css-cursor-pointer {
177 cursor: pointer;
178 }
179
180 #test-opacity {
181 opacity: 0.5;
182 -moz-opacity: 0.5;
183 filter: alpha(opacity=50);
184 }
185
186 #test-frame-offset {
187 display: block;
188 position: absolute;
189 top: 50px;
190 left: 50px;
191 width: 50px;
192 height: 50px;
193 }
194
195 #test-visible {
196 background: yellow;
197 position: absolute;
198 overflow: hidden;
199 }
200
201 #test-visible2 {
202 background: #ebebeb;
203 position: absolute;
204 overflow: hidden;
205 }
206
207 .scrollable-container {
208 border: 8px solid blue;
209 padding: 16px;
210 margin: 32px;
211 width: 100px;
212 height: 100px;
213 overflow: auto;
214 position: absolute;
215 left: 400px;
216 top: 0;
217 }
218
219 .scrollable-container-item {
220 margin: 1px;
221 border: 2px solid gray;
222 padding: 4px;
223 width: auto;
224 /* The overflow is different from style_test so that we have consistent
225 scroll positions in all browsers. */
226 overflow: hidden;
227 height: 20px;
228 }
229
230 #translation {
231 position: absolute;
232 z-index: 10;
233 left: 10px;
234 top: 10px;
235 width: 10px;
236 height: 10px;
237 background-color: blue;
238 -webkit-transform: translate(20px, 30px);
239 -ms-transform: translate(20px, 30px);
240 -o-transform: translate(20px, 30px);
241 -moz-transform: translate(20px, 30px);
242 transform: translate(20px, 30px);
243 }
244
245 </style>
246 </head>
247 <body>
248 <div id="testEl">
249 <span>Test Element</span>
250 </div>
251
252 <div id="testEl5">
253 <span>Test Element 5</span>
254 </div>
255
256 <table id="table1">
257 <tr>
258 <td id="td1">td1</td>
259 </tr>
260 </table>
261
262 <span id="span0">span0</span>
263
264 <ul>
265 <li id="li1">li1</li>
266 </ul>
267
268 <span id="span1" class="test1"></span>
269 <span id="span2" class="test1"></span>
270 <span id="span3" class="test2"></span>
271 <span id="span4" class="test3"></span>
272 <span id="span5" class="test1"></span>
273 <span id="span6" class="test1"></span>
274
275 <p id="p1"></p>
276
277 <div id="styleTest1"></div>
278 <div id="styleTest2" style="width:100px;text-decoration:underline"></div>
279 <div id="styleTest3"></div>
280
281 <!-- Paragraph to test element child and sibling -->
282 <p id="p2">
283 <!-- Comment -->
284 a
285 <b id="b1">c</b>
286 d
287 <!-- Comment -->
288 e
289 <b id="b2">f</b>
290 g
291 <!-- Comment -->
292 </p>
293
294 <p style="background-color: #eee">
295 <span id="bgcolorTest0">1</span>
296 <span id="bgcolorTest1">1</span>
297 <span id="bgcolorTest2">2</span>
298 <span id="bgcolorTest3">3</span>
299 <span id="bgcolorTest4" style="background-color:#ff0000">4</span>
300 <span id="bgcolorTest5">5</span>
301 <span id="bgcolorTest6">6</span>
302 <span id="bgcolorTest7">7</span>
303 <span id="bgcolorDest">Dest</span>
304 <span id="installTest0">Styled 0</span>
305 <span id="installTest1">Styled 1</span>
306 </p>
307
308 <div class='rtl-test' dir='ltr' id='rtl1'>
309 <div dir='rtl' id='rtl2'>right to left</div>
310 <div dir='ltr' id='rtl3'>left to right</div>
311 <div id='rtl4'>left to right (inherited)</div>
312 <div id='rtl5' style="direction: rtl">right to left (style)</div>
313 <div id='rtl6' style="direction: ltr">left to right (style)</div>
314 <div id='rtl7' class=rtl>right to left (css)</div>
315 <div id='rtl8' class=ltr>left to right (css)</div>
316 <div class=rtl>
317 <div id='rtl9'>right to left (css)</div>
318 </div>
319 <div class=ltr>
320 <div id='rtl10'>left to right (css)</div>
321 </div>
322 </div>
323
324 <div id="unselectable-gecko" style="-moz-user-select:none">no-select</div>
325 <div id="unselectable-webkit" style="-webkit-user-select:none">no-select</div>
326 <div id="unselectable-ie" unselectable="on">no-select</div>
327
328 <div id="make-unselectable">
329 <p>Can't touch this <aside>(Oh-oh oh oh-oh)</aside></p>
330 <div><em>Stop.</em> Hammer <math><mo>×</mo></math></div>
331 </div>
332
333 <div id="pos-scroll-abs">
334
335 <p>Some text some text some text some text some text some text some text
336 some text some text some text. Some text some text some text some text some
337 text some text some text some text some text some text. Some text some text
338 some text some text some text some text some text some text some text some
339 text. Some text some text some text some text some text some text some text
340 some text some text some text.
341
342 <p>Some text some text some text some text some text some text some text
343 some text some text some text. Some text some text some text some text some
344 text some text some text some text some text some text. Some text some text
345 some text some text some text some text some text some text some text some
346 text. Some text some text some text some text some text some text some text
347 some text some text some text.
348
349 <div id="pos-scroll-abs-1">
350 <p>Some text some text some text some text some text some text some text
351 some text some text some text. Some text some text some text some text
352 some text some text some text some text some text some text. Some text
353 some text some text some text some text some text some text some text some
354 text some text. Some text some text some text some text some text some
355 text some text some text some text some text.
356
357 <p>Some text some text some text some text some text some text some text
358 some text some text some text. Some text some text some text some text
359 some text some text some text some text some text some text. Some text
360 some text some text some text some text some text some text some text some
361 text some text. Some text some text some text some text some text some
362 text some text some text some text some text.
363
364 <div id="pos-scroll-abs-2">
365
366 <p>Some text some text some text some text some text some text some text
367 some text some text some text. Some text some text some text some text
368 some text some text some text some text some text some text. Some text
369 some text some text some text some text some text some text some text
370 some text some text. Some text some text some text some text some text
371 some text some text some text some text some text.
372
373 </div>
374
375 </div>
376
377 </div>
378
379 <div id="abs-upper-left">
380 foo
381 </div>
382
383 <div id="no-text-font-styles">
384 <font size="+1" face="Times,serif" id="font-tag">Times</font>
385 <pre id="pre-font">pre text</pre>
386 <span style="font:inherit" id="inherit-font">inherited</span>
387 <span style="font-family:Times,sans-serif; font-size:3in"
388 id="times-font-family">Times</span>
389 <b id="bold-font">Bolded</b>
390 <i id="css-html-tag-redefinition">Times</i>
391 <span id="small-text" class="century" style="font-size:small">eensy</span>
392 <span id="x-small-text" style="font-size:x-small">weensy</span>
393 <span style="font:50% badFont" id="font-style-badfont">
394 badFont
395 <span style="font:inherit" id="inherit-50pct-font">
396 same size as badFont
397 </span>
398 </span>
399 <span id="icon-font" style="font:icon">Icon Font</span>
400 </div>
401 <span id="no-font-style">plain</span>
402 <span style="font-family:Arial" id="nested-font">Arial<span style="font-family:Times">Times nested inside Arial</span></span>
403 <img id="img-font-test" src=""/>
404
405 <span style="font-size:25px">
406 <span style="font-size:12.5px" id="font-size-12-point-5-px">12.5PX</span>
407 <span style="font-size:0.5em" id="font-size-50-pct-of-25-px">12.5PX</span>
408 </span>
409
410 <div id="size-a"></div>
411
412 <div id="size-b"></div>
413
414 <div id="size-c">xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxx
415 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
416 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
417 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
418 xxxxxxxxxxxxxxxx</div>
419
420 <div id="size-d">xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxx
421 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
422 xxxxxxxx x</div>
423
424 <div id="size-e"></div>
425
426 <div id="size-f">hello</div>
427
428 <div style="font-size: 1px">
429 <div style="font-size: 2em"><span id="em-font-size"></span></div>
430 </div>
431
432 <div id="no-float"></div>
433
434 <div id="float-none" style="float:none"></div>
435
436 <div id="float-left" style="float:left"></div>
437
438 <div id="float-test"></div>
439
440 <div id="position-unset"></div>
441 <div id="style-position-relative" style="position:relative"></div>
442 <div id="style-position-fixed" style="position:fixed"></div>
443 <div id="css-position-absolute"></div>
444
445 <div id="box-sizing-unset"></div>
446 <div id="box-sizing-border-box" style="box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;"></div>
447
448 <div id="style-overflow-scroll" style="overflow:scroll"></div>
449 <div id="css-overflow-hidden"></div>
450
451 <!-- Getting the computed z-index of an unpositioned element is unspecified. -->
452 <div id="style-z-index-200" style="position:relative;z-index:200"></div>
453 <div id="css-z-index-200"></div>
454
455 <div id="style-text-align-right" style="text-align:right">
456 <div id="style-text-align-right-inner">foo</div>
457 </div>
458 <div id="css-text-align-center"></div>
459
460 <div id="style-cursor-move" style="cursor:move">
461 <span id="style-cursor-move-inner">foo</span>
462 </div>
463 <div id="css-cursor-pointer"></div>
464
465 <div id="height-test" style="display:inline-block;position:relative">
466 <div id="height-test-inner" style="display:inline-block">
467 foo
468 </div>
469 </div>
470
471 <div id="test-opacity"></div>
472
473 <iframe id="test-frame-offset"></iframe>
474
475 <iframe id="test-translate-frame-standard" src="style_test_standard.html"
476 style="overflow:auto;position:absolute;left:100px;top:150px;width:200px;height:200px;border:0px;">
477 </iframe>
478 <iframe id="test-translate-frame-quirk" src="style_test_quirk.html"
479 style="overflow:auto;position:absolute;left:100px;top:350px;width:200px;height:200px;border:0px;margin:0px;">
480 </iframe>
481
482 <iframe
483 id="test-visible-frame"
484 src="style_test_iframe_standard.html"
485 style="width: 200px; height: 200px; border: 0px;">
486 </iframe>
487
488 <div id="test-scrollbarwidth" style="background-color: orange; width: 100px; height: 100px; overflow: auto;">
489 <div style='width: 200px; height: 200px; background-color: red'>Test Scroll bar width with scroll</div>
490 </div>
491
492 <div id="scrollable-container" class="scrollable-container">
493 <!--
494 Workaround for overlapping top padding of the container and top margin of
495 the first item in Internet Explorer 6 and 7.
496 See http://www.quirksmode.org/bugreports/archives/2005/01/IE_nested_boxes_padding_topmargin_top.html#c11285
497 -->
498 <div style="height: 0"><!-- --></div>
499 <div id="item1" class="scrollable-container-item">1</div>
500 <div id="item2" class="scrollable-container-item">2</div>
501 <div id="item3" class="scrollable-container-item">3</div>
502 <div id="item4" class="scrollable-container-item">4</div>
503 <div id="item5" class="scrollable-container-item">5</div>
504 <div id="item6" class="scrollable-container-item">6</div>
505 <div id="item7" class="scrollable-container-item">7</div>
506 <div id="item8" class="scrollable-container-item">8</div>
507 </div>
508
509 <div id="test-visible">
510 Test-visible
511 <div id="test-visible-el" style="height:200px;">Test-visible</div>
512 Test-visible
513 </div>
514
515 <div id="test-visible2"></div>
516
517 <div id="msFilter" style="-ms-filter:'alpha(opacity=0)'">
518 A div</div>
519 <div id="filter" style="filter:alpha(opacity=0)">
520 Another div</div>
521
522 <div id="offset-parent" style="position:relative">
523 <div id="offset-child">child</div>
524 </div>
525
526 <div id="offset-parent-overflow"
527 style="overflow: scroll; width: 50px; height: 50px;">
528 <a id="offset-child-overflow">
529 scrollscrollscrollscrollscrollscrollscrollscroll
530 </a>
531 </div>
532
533 <div id="test-viewport"></div>
534 <div id="translation"></div>
535
536 <div id="rotated"></div>
537 <div id="scaled"></div>
538
539 <script>
540 if (!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9)) {
541 document.write(
542 '<iframe id="svg-frame" src="style_test_rect.svg"></' + 'iframe>');
543 }
544 goog.require('goog.style_test');
545 </script>
546
547 </body>
548 </html>