summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-text/line-break/line-break-loose-016b.xht
blob: 261cce5f67b04a3e0743ed84137301a155db6e2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>CSS Text Test: line-break - loose and centered punctuation marks</title>
		<!-- centered punctuation marks -->
		<link rel="author" title="Taka Oshiyama" href="mailto:takaoshiyama@gmail.com" />
		<link rel="author" title="Shinyu Murakami" href="mailto:murakami@vivliostyle.org" />
		<link rel="help" title="5.3. Line Breaking Rules: the 'line-break' property" href="https://drafts.csswg.org/css-text-3/#line-break-property" />
		<link rel="match" href="reference/line-break-loose-016b-ref.xht" />
		<meta http-equiv="content-language" content="en, ja" />
		<meta name="assert" content="This test verifies that 'line-break: loose' allows line breaking before centered punctuation marks." />
		<style type="text/css">
			@font-face
			{
				font-family: "mplus-1p-regular";
				src: url("/fonts/mplus-1p-regular.woff") format("woff");
				/* filesize: 803300 bytes (784.5 KBytes) */
				/*
				mplus-1p-regular.ttf can be downloaded at/from [TBD later]
				*/
			}
			.test span {
				line-break: loose;						/* The property to be tested */
			}
			p.test, p.control {
				border: 1px solid gray;
				color: blue;
				font-family: "mplus-1p-regular";
				width: 10.2em;		/* added extra .2em for some symbols wider than 1em */
			}
			span.target {
				background-color: aqua;
			}
			div.wrapper {
				display: inline-block;
				border: 1px solid;
				margin: 5px;
				padding: 5px;
			}
		</style>
	</head>
	<body lang="en">
		<p>
			Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position.
		</p>
		<div class="wrapper">
			<!-- centered punctuation marks DOUBLE EXCLAMATION MARK -->
			<p class="test" lang="ja">
				<span>サンプル文サンプル文<span class="target">&#x203c;</span>サンプル文</span>
			</p>
			<p class="control" lang="ja">
				<span>サンプル文サンプル文<br /><span class="target">&#x203c;</span>サンプル文</span>
			</p>
		</div>
		<div class="wrapper">
			<!-- centered punctuation marks DOUBLE QUESTION MARK -->
			<p class="test" lang="ja">
				<span>サンプル文サンプル文<span class="target">&#x2047;</span>サンプル文</span>
			</p>
			<p class="control" lang="ja">
				<span>サンプル文サンプル文<br /><span class="target">&#x2047;</span>サンプル文</span>
			</p>
		</div>
		<div class="wrapper">
			<!-- centered punctuation marks QUESTION EXCLAMATION MARK -->
			<p class="test" lang="ja">
				<span>サンプル文サンプル文<span class="target">&#x2048;</span>サンプル文</span>
			</p>
			<p class="control" lang="ja">
				<span>サンプル文サンプル文<br /><span class="target">&#x2048;</span>サンプル文</span>
			</p>
		</div>
		<div class="wrapper">
			<!-- centered punctuation marks EXCLAMATION QUESTION MARK -->
			<p class="test" lang="ja">
				<span>サンプル文サンプル文<span class="target">&#x2049;</span>サンプル文</span>
			</p>
			<p class="control" lang="ja">
				<span>サンプル文サンプル文<br /><span class="target">&#x2049;</span>サンプル文</span>
			</p>
		</div>
		<div class="wrapper">
			<!-- centered punctuation marks FULLWIDTH EXCLAMATION MARK -->
			<p class="test" lang="ja">
				<span>サンプル文サンプル文<span class="target">&#xff01;</span>サンプル文</span>
			</p>
			<p class="control" lang="ja">
				<span>サンプル文サンプル文<br /><span class="target">&#xff01;</span>サンプル文</span>
			</p>
		</div>
		<div class="wrapper">
			<!-- centered punctuation marks FULLWIDTH QUESTION MARK -->
			<p class="test" lang="ja">
				<span>サンプル文サンプル文<span class="target">&#xff1f;</span>サンプル文</span>
			</p>
			<p class="control" lang="ja">
				<span>サンプル文サンプル文<br /><span class="target">&#xff1f;</span>サンプル文</span>
			</p>
		</div>
	</body>
</html>