eol-spaces-bidi-004.html (1417B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>CSS Text 3 test: trailing collapsible spaces and bidi</title> 4 <link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap"> 6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> 7 <link rel="match" href="reference/eol-spaces-bidi-004-ref.html"> 8 <link rel="match" href="reference/eol-spaces-bidi-alt-004-ref.html"> 9 <meta name="assert" content="Hanging space should take paragraph direction and show at the end of the line (blue box to the left)"> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 11 12 <style> 13 div#test { 14 direction: rtl; 15 text-align: left; 16 17 font: 20px/1 Ahem; 18 margin-left: 20px; 19 background: green; 20 color: red; 21 22 width: 4ch; 23 white-space: pre-wrap; 24 } 25 span { 26 background: blue; 27 } 28 #green-cover { 29 position: absolute; 30 margin-left: 20px; 31 width: 60px; 32 height: 40px; 33 background: 34 linear-gradient(green, green) 0 0 / 60px 20px no-repeat, 35 linear-gradient(green, green) 0 20px / 20px 20px no-repeat; 36 z-index: 1; 37 } 38 </style> 39 <p>Test passes if a blue box (the white space) is visible at the left start in first line and <strong>no red</strong> is shown.</p> 40 <div id="green-cover"></div> 41 <div id="test"><span>XXX </span>X</div>