wpt / css / css-text / hanging-punctuation / hanging-punctuation-first-001.xht

Status: FAIL | Duration: 24ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-text/hanging-punctuation/hanging-punctuation-first-001.xht

<?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" xml:lang="ja">
	<head>
		<title>CSS Test: hanging-punctuation - first - basic cases</title>
		<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
		<link rel="help" title="CSS Text Level 3: 10.2. Hanging Punctuation: the ‘hanging-punctuation’ property" href="http://www.w3.org/TR/css-text-3/#hanging-punctuation" />
		<link rel="match" href="reference/hanging-punctuation-first-001-ref.xht"/>
		<meta name="assert" content="This property determines whether a punctuation mark, if one is present, may be placed outside the line box (or in the indent) at the start or at the end of a full line of text." />
		<style type="text/css">
			<![CDATA[
				.test {
					hanging-punctuation: first;
				}
				/* the CSS below is not part of the test */
				body {
					font-family: "IPAMincho", "IPAGothic", "IPA明朝", "IPAゴシック";
				}
				.hanging {
					left: -1em;
					position: relative;
				}
				.no-wrap {
					white-space: nowrap;
				}
				.parent {
					border: 1px solid gray;
					margin-left: 2em;
					width: 10em
				}
				div.wrapper {
					display: inline-block;
					border: 1px solid;
					margin: 10px;
					padding: 10px;
				}
				span.attention {
					color: red;
				}
			]]>
		</style>
	</head>
	<body>
		<p>
			Test passes if each pair of upper and lower text in the square box is identical.
		</p>
		<div class="wrapper">
			<div>
				Opening brackets
			</div>
			<div class="parent">
				<div class="test">
					「これは、満たすための文字です。」
				</div>
				<br />
				<div class="no-wrap">
					<span class="hanging">「これは、満たすための</span><br />文字です。」
				</div>
			</div>
		</div>
		<div class="wrapper">
			<div>
				Closing brackets
			</div>
			<div class="parent">
				<div class="test">
					これは、「満たす文字」です。
				</div>
				<br />
				<div class="no-wrap">
					これは、「満たす文<br />字」です。
				</div>
			</div>
		</div>
		<div class="wrapper">
			<div>
				Initial quotes
			</div>
			<div class="parent">
				<div class="test">
					“これは、満たすための文字です。”
				</div>
				<br />
				<div class="no-wrap">
					<span class="hanging hanging-iq">”これは、満たすための</span><br />文字です。”
				</div>
			</div>
		</div>
		<div class="wrapper">
			<div>
				Final quotes
			</div>
			<div class="parent">
				<div class="test">
					これは、“満たす文字”です。
				</div>
				<br />
				<div class="no-wrap">
					これは、”満たす文字”<br />です。
				</div>
			</div>
		</div>
		<p>
			<span class="attention">* You will need a Japanese font.</span><br />
			If you are unable to see font glyphs for certain characters using the browsers default font, install the <a href="http://ossipedia.ipa.go.jp/ipafont/">IPA Font(http://ossipedia.ipa.go.jp/ipafont/)</a> and reload this page.
		</p>
	<script type="text/javascript">
	//<![CDATA[
	(function() {
		var probe = document.createElement('span');
		probe.textContent = '\u201C';
		probe.style.visibility = 'hidden';
		probe.style.position = 'absolute';
		document.body.appendChild(probe);
		var w = probe.getBoundingClientRect().width;
		document.body.removeChild(probe);
		var spans = document.getElementsByClassName('hanging-iq');
		for (var i = 0; i < spans.length; i++)
			spans[i].style.left = '-' + w + 'px';
	})();
	//]]>
	</script>
	</body>
</html>

/css/css-text/hanging-punctuation/reference/hanging-punctuation-first-001-ref.xht

<?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" xml:lang="ja">
	<head>
		<title>CSS Test: hanging-punctuation - first - basic cases Reftest Reference</title>
		<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
		<style type="text/css">
			<![CDATA[
				body {
					font-family: "IPAMincho", "IPAGothic", "IPA明朝", "IPAゴシック";
				}
				.hanging {
					left: -1em;
					position: relative;
				}
				.no-wrap {
					white-space: nowrap;
				}
				.parent {
					border: 1px solid gray;
					margin-left: 2em;
					width: 10em
				}
				div.wrapper {
					display: inline-block;
					border: 1px solid;
					margin: 10px;
					padding: 10px;
				}
				span.attention {
					color: red;
				}
			]]>
		</style>
	</head>
	<body>
		<p>
			Test passes if each pair of upper and lower text in the square box is identical.
		</p>
		<div class="wrapper">
			<div>
				Opening brackets
			</div>
			<div class="parent">
				<div class="no-wrap">
					<span class="hanging">「これは、満たすための</span><br />文字です。」
				</div>
				<br />
				<div class="no-wrap">
					<span class="hanging">「これは、満たすための</span><br />文字です。」
				</div>
			</div>
		</div>
		<div class="wrapper">
			<div>
				Closing brackets
			</div>
			<div class="parent">
				<div class="no-wrap">
					これは、「満たす文<br />字」です。
				</div>
				<br />
				<div class="no-wrap">
					これは、「満たす文<br />字」です。
				</div>
			</div>
		</div>
		<div class="wrapper">
			<div>
				Initial quotes
			</div>
			<div class="parent">
				<div class="no-wrap">
					<span class="hanging hanging-iq">“これは、満たすための</span><br />文字です。”
				</div>
				<br />
				<div class="no-wrap">
					<span class="hanging hanging-iq">”これは、満たすための</span><br />文字です。”
				</div>
			</div>
		</div>
		<div class="wrapper">
			<div>
				Final quotes
			</div>
			<div class="parent">
				<div class="no-wrap">
					これは、“満たす文字”<br />です。
				</div>
				<br />
				<div class="no-wrap">
					これは、”満たす文字”<br />です。
				</div>
			</div>
		</div>
		<p>
			<span class="attention">* You will need a Japanese font.</span><br />
			If you are unable to see font glyphs for certain characters using the browsers default font, install the <a href="http://ossipedia.ipa.go.jp/ipafont/">IPA Font(http://ossipedia.ipa.go.jp/ipafont/)</a> and reload this page.
		</p>
	<script type="text/javascript">
	//<![CDATA[
	(function() {
		var probe = document.createElement('span');
		probe.textContent = '\u201C';
		probe.style.visibility = 'hidden';
		probe.style.position = 'absolute';
		document.body.appendChild(probe);
		var w = probe.getBoundingClientRect().width;
		document.body.removeChild(probe);
		var spans = document.getElementsByClassName('hanging-iq');
		for (var i = 0; i < spans.length; i++)
			spans[i].style.left = '-' + w + 'px';
	})();
	//]]>
	</script>
	</body>
</html>