1 <!DOCTYPE html>
2 <html><head><meta charset="utf-8">
3 <title>CSS Basic User Interface Test: box-sizing:border-box and auto sizing of intrinsicly sized replaced elements.</title>
4 <link href="http://florian.rivoal.net/" rel="author" title="Florian Rivoal">
5 <link href="https://drafts.csswg.org/css-ui-3/#box-sizing" rel="help">
6 <link href="http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width" rel="help">
7 <link href="http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height" rel="help">
8 <meta content="svg" name="flags">
9 <link href="reference/box-sizing-007-ref.htm" rel="match">
10 <meta content="Exercises the sizing rules in CSS2.1 10.3.2 and 10.6.2 with box-sizing:border-box for replaced elements with either both intrisic dimentions or an intrinsic ratio, to check that they work correctly in terms of the content width height." name="assert">
11 <style>
12 img {
13 box-sizing: border-box;
14 width: auto;
15 height: auto;
16 background: white;
17 margin: 10px;
18 }
19
20 #t01, #t11, #t21, #t31 {
21 padding-left: 20px;
22 margin-left: -10px; /*not strictly necessary, but helps preserve alignment, which makes visual verification easier. */
23 }
24 #t02, #t12, #t22, #t32 {
25 padding-bottom: 20px;
26 margin-bottom: -10px; /*not strictly necessary, but helps preserve alignment, which makes visual verification easier. */
27 }
28 #t03, #t13, #t23, #t33 {
29 width: 120px;
30 padding-left: 20px;
31 margin-left: -10px; /*not strictly necessary, but helps preserve alignment, which makes visual verification easier. */
32 }
33 #t04, #t14, #t24, #t34 {
34 height: 120px;
35 padding-bottom: 20px;
36 margin-bottom: -10px; /*not strictly necessary, but helps preserve alignment, which makes visual verification easier. */
37 }
38
39 #t30, #t32 {
40 width: 100px;
41 }
42
43 #t31 {
44 height: 100px;
45 }
46 body {
47 max-width: 700px;
48 }
49 </style>
50 </head><body>
51 <p>Test passes if there are 20 <strong>filled green squares</strong> and they are the <strong>same size</strong>.</p>
52 <img src="support/w100_h100.svg" id="t00">
53 <img src="support/w100_h100.svg" id="t01">
54 <img src="support/w100_h100.svg" id="t02">
55 <img src="support/w100_h100.svg" id="t03">
56 <img src="support/w100_h100.svg" id="t04">
57
58 <img src="support/w100_r1-1.svg" id="t10">
59 <img src="support/w100_r1-1.svg" id="t11">
60 <img src="support/w100_r1-1.svg" id="t12">
61 <img src="support/w100_r1-1.svg" id="t13">
62 <img src="support/w100_r1-1.svg" id="t14">
63
64 <img src="support/h100_r1-1.svg" id="t20">
65 <img src="support/h100_r1-1.svg" id="t21">
66 <img src="support/h100_r1-1.svg" id="t22">
67 <img src="support/h100_r1-1.svg" id="t23">
68 <img src="support/h100_r1-1.svg" id="t24">
69
70 <img src="support/r1-1.svg" id="t30">
71 <img src="support/r1-1.svg" id="t31">
72 <img src="support/r1-1.svg" id="t32">
73 <img src="support/r1-1.svg" id="t33">
74 <img src="support/r1-1.svg" id="t34">
75
76 </body></html>