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