first-letter-width.html (914B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <html lang="en"> 4 <head> 5 <title>initial-letter width test</title> 6 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=362880"> 7 <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-letter-styling"> 8 <link rel="match" href="first-letter-width-ref.html"> 9 <meta name="assert" content="The width of an element with first-letter styling should render correctly."> 10 <style> 11 div { 12 position: relative; 13 } 14 span { 15 position: absolute; 16 color: transparent; 17 } 18 #control { 19 background-color: green; 20 } 21 #test { 22 background-color: red; 23 line-height: 1; 24 top: 1px; 25 } 26 #test::first-letter { 27 text-transform: uppercase; 28 } 29 </style> 30 </head> 31 <body> 32 <p>There should be no red</p> 33 <div> 34 <span id="test">Test</span> 35 <span id="control">Test.</span> 36 </div> 37 </body> 38 </html>