| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <title>CSS Values and Units Test: support for the ch unit</title> |
| <link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au"> |
| <link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths"> |
| <link rel="match" href="reference/ch-unit-013-ref.html"> |
| <meta name="assert" content="When a zero glyph is not present, in vertical mixed writing modes the ch unit falls back to 0.5em."> |
| <style> |
| @font-face { |
| font-family: ChTestNoZero; |
| src: url(resources/ChTestNoZero.woff); |
| } |
| div { |
| height: 10px; |
| background-color: blue; |
| margin-top: 10px; |
| } |
| .test { |
| writing-mode: vertical-rl; |
| width: 5ch; |
| } |
| .ref { |
| width: 100px; |
| } |
| </style> |
| <p>The test passes if there are two blue rectangles of equal length.</p> |
| <!-- ChTestNoZero has no '0' glyph, so ch units should compute to 0.5em, |
| resulting in the div being 100px wide. --> |
| <div class="test" style="font: 40px ChTestNoZero;"></div> |
| <div class="ref"></div> |