initial-letter-sunk-initial-ref.html (1303B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Tests initial letter sunken initial</title> 5 <link rel="author" title="Google LLC" href="https://www.google.com/"> 6 <link rel="help" href="https://drafts.csswg.org/css-inline/#sunk-initial"> 7 <meta name="flags" content="ahem"> 8 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" > 9 <script src="resources/initial-letter-variants.js"></script> 10 <style> 11 .sample { 12 border: solid 1px green; 13 font-family: Ahem; 14 font-size: 20px; 15 line-height: 24px; 16 width: 230px; 17 } 18 19 .fake-initial-letter { 20 background: lime; 21 float: left; 22 --cap: 0.8; 23 --size: calc((24px * 2 + 20px * var(--cap)) / var(--cap)); 24 height: var(--size); 25 width: var(--size); 26 margin-top: 2px; 27 } 28 29 .no-ascent .fake-initial-letter { 30 height: calc(var(--size) * (1 - var(--cap))); 31 margin-top: calc(var(--size) * var(--cap) + 2px); 32 } 33 .no-descent .fake-initial-letter { 34 height: calc(var(--size) * var(--cap)); 35 } 36 .rtl { 37 direction: rtl; 38 .fake-initial-letter { 39 float: right; 40 } 41 } 42 </style> 43 </head> 44 <body> 45 <div class="sample"> 46 <div class="fake-initial-letter"></div><br> 47 bc<br>def<br>ghi<br>jkl<br>mno<br> 48 </div> 49 </body> 50 </html>