1 <!DOCTYPE html>
2 <html><head><meta charset="utf-8">
3 <title>CSS Values and Units Test: support for the ch unit</title>
4 <link href="http://florian.rivoal.net/" rel="author" title="Florian Rivoal">
5 <link href="https://drafts.csswg.org/css-values-3/#font-relative-lengths" rel="help">
6 <meta content="" name="flags">
7 <link href="reference/ch-unit-001-ref.htm" rel="match">
8 <meta content="The ch unit is equal to the used advance measure of the 0 (ZERO, U+0030) glyph found in the font used to render it." name="assert">
9 <style>
10 span {
11 background: green;
12 color: green;
13 top: 0; bottom: 0;
14 position: absolute;
15 }
16 div {
17 background: red;
18 color: red;
19 position: relative;
20 height: 10ch;
21 width: 5ch;
22 float: left;
23 }
24
25 div + div {
26 width: auto;
27 }
28
29 div + div span {
30 width: 5ch;
31 }
32 </style>
33 </head><body>
34 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
35 <div><span>00000</span></div>
36 <div><span></span>00000</div>
37
38 </body></html>