white-space-collapsing-preserve-breaks-001

white-space-collapsing - preserve-breaks - basic cases

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
The UA should collapse sequences of white space into a single character when white-space-collapsing is set to preserve.

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 - preserve-breaks - 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-preserve-breaks-001-ref.htm">
 8 		<meta name="flags" content="">
 9 		<meta name="assert" content="The UA should collapse sequences of white space into a single character when white-space-collapsing is set to preserve.">
10 		<style type="text/css">
11 			
12 				.test span {
13 					white-space-collapsing: preserve-breaks;
14 				}
15 				/* the CSS below is not part of the test */
16 				span {
17 					color: Blue;
18 				}
19 			
20 		</style>
21 	</head>
22 	<body>
23 		<p>
24 			Test passes if the first two sentences matches the second one.
25 		</p>
26 		<p class="test">
27 			<span>
28 				Sequences of  white   space    should     collapse      into       a        single         character.
29 				But segment  breaks   as    forced     line      breaks       are        preserved.
30 			</span>
31 		</p>
32 		<p>
33 			<span>
34 				Sequences of white space should collapse into a single character.<br>
35 				But segment breaks as forced line breaks are preserved.
36 			</span>
37 		</p>
38 	</body>
39 </html>