ic-unit-001.html (1158B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Values and Units Test: support for the ic 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-4/#font-relative-lengths"> 6 <link rel="match" href="reference/ic-unit-001-ref.html"> 7 <meta name="assert" content="The ic unit is equal to the used advance measure of the 水 (CJK water ideograph, U+6C34) glyph found in the font used to render it."> 8 <style> 9 @font-face { 10 font-family: IcTestFullWidth; 11 src: url(resources/IcTestFullWidth.woff2); 12 } 13 14 span { 15 font: 20px IcTestFullWidth; 16 background: green; 17 color: green; 18 top: 0; bottom: 0; 19 position: absolute; 20 } 21 div { 22 font: 20px IcTestFullWidth; 23 background: red; 24 color: red; 25 position: relative; 26 height: 10ic; 27 width: 5ic; 28 float: left; 29 } 30 31 div + div { 32 width: auto; 33 } 34 35 div + div span { 36 width: 5ic; 37 } 38 </style> 39 <body> 40 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> 41 <div><span>水水水水水</span></div> 42 <div><span></span>水水水水水</div> 43 </body>