text-transform-fullwidth-008.html (1258B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Text level 3 Test: text-transform:fullwidth and trailing spaces</title> 4 <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> 5 <link rel="help" href="https://www.w3.org/TR/css-text-3/#text-transform-property"> 6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> 7 <link rel="match" href="reference/text-transform-fullwidth-008-ref.html"> 8 <meta name="assert" content="full-width does transforms U+0020 spaces to U+3000 after phase 1, but before phase 2, so that end-of-line transformed spaces get the same treatment as natural ones: hang when white-space is normal."> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style> 11 div { 12 font: 20px/1 Ahem; 13 margin: 1em 0; 14 } 15 .pre { 16 white-space: pre; 17 } 18 #test, #ref { 19 width: 2em; 20 text-align: right; 21 } 22 span { 23 text-transform: full-width; 24 } 25 #test2, #ref2 { 26 width: min-content; 27 margin-left: 1em; 28 background: black; 29 } 30 </style> 31 32 <p>Test passes if all black boxes below have the same width and height and are aligned vertically. 33 <div class=pre> x<br> x</div> 34 <div id=ref>x x</div> 35 <div id=test>x<span> </span>x</div> 36 <div id=ref2>x x</div> 37 <div id=test2>x<span> </span>x</div>