white-space-collapsing-trim-inner-001

white-space-collapsing - trim-inner - basic cases

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
The UA should discard all white space at the beginning of a block and all white space at the end of a block when white-space-collapsing is set to trim-inner.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 	<head>
 4 		<title>CSS Test: white-space-collapsing - trim-inner - basic cases</title>
 5 		<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp">
 6 		<link rel="help" title="CSS Text Level 3: 4.1. White Space Collapsing: the ‘white-space-collapsing’ property" href="http://www.w3.org/TR/css-text-3/#white-space-collapsing">
 7 		<link rel="match" href="reference/white-space-collapsing-trim-inner-001-ref.htm">
 8 		<meta name="flags" content="">
 9 		<meta name="assert" content="The UA should discard all white space at the beginning of a block and all white space at the end of a block when white-space-collapsing is set to trim-inner.">
10 		<style type="text/css">
11 			
12 				.test span {
13 					white-space-collapsing: trim-inner;
14 				}
15 				/* the CSS below is not part of the test */
16 				div {
17 					color: Blue;
18 				}
19 			
20 		</style>
21 	</head>
22 	<body>
23 		<p>
24 			Test passes if each text positions in the first line match the corresponding positions in the second line.
25 		</p>
26 		<div>
27 			<div class="test">
28 				<span>        1        2        </span>
29 				<span>&#x3000;&#x3000;3&#x3000;&#x3000;4&#x3000;&#x3000;</span>
30 				<span>				5				6				</span>
31 				<span>
32 
33 7
34 
35 8
36 
37 </span>
38 			</div>
39 			<div>
40 				<span>1        2</span>
41 				<span>&#x3000;&#x3000;3&#x3000;&#x3000;4&#x3000;&#x3000;</span>
42 				<span>5				6</span>
43 				<span>7
44 
45 8</span>
46 			</div>
47 		</div>
48 	</body>
49 </html>