Skip to content

Commit

Permalink
[css-writing-modes] Add text-combine-upright tests (#16770)
Browse files Browse the repository at this point in the history
* [css-writing-modes] Add text-combine-upright tests

* Trim trailing whitespace
  • Loading branch information
xfq authored and kojiishi committed May 20, 2019
1 parent f510720 commit 1133fff
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 0 deletions.
30 changes: 30 additions & 0 deletions css/css-writing-modes/text-combine-upright-all-001-manual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>text-combine-upright:all (up to 2 chars)</title>
<link rel="author" title="Richard Ishida" href="mailto:[email protected]"/>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#text-combine-upright"/>
<meta name="assert" content="text-combine-upright:digits will display two-character numbers and text horizontally."/>
<style type="text/css">
@font-face {
font-family: "webfont";
src: url("../../fonts/CSSTest/mplus-1p-regular.woff") format("woff");
font-weight: normal;
font-style: normal;
}
.test, .ref { font-family: webfont, serif; font-size: 24px; height: 300px; width: 300px; }
</style>
<!-- this is the test -->
<style type="text/css">
.test { writing-mode: vertical-rl; }
.test span { text-combine-upright: all; }
</style>
</head>
<body>
<p class="instructions" dir="ltr">Test passes if all numbers and the text GI are upright and not more than one cell wide.</p>
<div class="test">
<p lang="ja"><span>今日</span><span>5</span><span>12</span>日です。<span>GI</span></p>
</div>
</body>
</html>
30 changes: 30 additions & 0 deletions css/css-writing-modes/text-combine-upright-all-002-manual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>text-combine-upright:all (up to 4 chars)</title>
<link rel="author" title="Richard Ishida" href="mailto:[email protected]"/>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#text-combine-upright"/>
<meta name="assert" content="text-combine-upright:all will display up to four-character numbers horizontally."/>
<style type="text/css">
@font-face {
font-family: "webfont";
src: url("../../fonts/CSSTest/mplus-1p-regular.woff") format("woff");
font-weight: normal;
font-style: normal;
}
.test, .ref { font-family: webfont, serif; font-size: 24px; height: 300px; width: 300px; }
</style>
<!-- this is the test -->
<style type="text/css">
.test { writing-mode: vertical-rl; }
.test span { text-combine-upright: all; }
</style>
</head>
<body>
<p class="instructions" dir="ltr">Test passes if all four numbers are upright and not more than one cell wide.</p>
<div class="test">
<p lang="ja"><span>W3C</span>会議は<span>2016</span><span>5</span><span>12</span>日です。<span>242</span>日目です。</p>
</div>
</body>
</html>
29 changes: 29 additions & 0 deletions css/css-writing-modes/text-combine-upright-digits-001-manual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>text-combine-upright:digits</title>
<link rel="author" title="Richard Ishida" href="mailto:[email protected]"/>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#text-combine-upright"/>
<meta name="assert" content="text-combine-upright:digits will display two-digit numbers horizontally, but not others."/>
<style type="text/css">
@font-face {
font-family: "webfont";
src: url("../../fonts/CSSTest/mplus-1p-regular.woff") format("woff");
font-weight: normal;
font-style: normal;
}
.test, .ref { font-family: webfont, serif; font-size: 24px; height: 300px; width: 300px; }
</style>
<!-- this is the test -->
<style type="text/css">
.test { writing-mode: vertical-rl; text-combine-upright: digits; }
</style>
</head>
<body>
<p class="instructions" dir="ltr">Test passes if 5 and 12 are upright, and 2016 and 242 are not.</p>
<div class="test">
<p lang="ja">今日は2016年5月12日です。242日目です。</p>
</div>
</body>
</html>
29 changes: 29 additions & 0 deletions css/css-writing-modes/text-combine-upright-digits-002-manual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>text-combine-upright:digits 2</title>
<link rel="author" title="Richard Ishida" href="mailto:[email protected]"/>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#text-combine-upright"/>
<meta name="assert" content="text-combine-upright:digits 2 will display two-digit numbers horizontally, but not others."/>
<style type="text/css">
@font-face {
font-family: "webfont";
src: url("../../fonts/CSSTest/mplus-1p-regular.woff") format("woff");
font-weight: normal;
font-style: normal;
}
.test, .ref { font-family: webfont, serif; font-size: 24px; height: 300px; width: 300px; }
</style>
<!-- this is the test -->
<style type="text/css">
.test { writing-mode: vertical-rl; text-combine-upright: digits 2; }
</style>
</head>
<body>
<p class="instructions" dir="ltr">Test passes if 5 and 12 are upright, and 2016 and 242 are not.</p>
<div class="test">
<p lang="ja">今日は2016年5月12日です。242日目です。</p>
</div>
</body>
</html>
29 changes: 29 additions & 0 deletions css/css-writing-modes/text-combine-upright-digits-004-manual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>text-combine-upright:digits 4</title>
<link rel="author" title="Richard Ishida" href="mailto:[email protected]"/>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#text-combine-upright"/>
<meta name="assert" content="text-combine-upright:digits 4 will display all numbers up to four digits long horizontally."/>
<style type="text/css">
@font-face {
font-family: "webfont";
src: url("../../fonts/CSSTest/mplus-1p-regular.woff") format("woff");
font-weight: normal;
font-style: normal;
}
.test, .ref { font-family: webfont, serif; font-size: 24px; height: 300px; width: 300px; }
</style>
<!-- this is the test -->
<style type="text/css">
.test { writing-mode: vertical-rl; text-combine-upright: digits 4; }
</style>
</head>
<body>
<p class="instructions" dir="ltr">Test passes if all numbers are upright.</p>
<div class="test">
<p lang="ja">今日は2016年5月12日です。242日目です。</p>
</div>
</body>
</html>

0 comments on commit 1133fff

Please sign in to comment.