Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 5e97f1d

Browse files
frivoalgsnedders
authored andcommitted
[css-text-3] Line breaking tests (#1135)
1 parent 3baf133 commit 5e97f1d

16 files changed

+576
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking around Zero With Space</title>
5+
<meta name=assert content="When ‘white-space’ allows wrapping, line breaking behavior defined for the ZW line-breaking classes in [UAX14] must be honored.">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
.container {
19+
position: relative;
20+
}
21+
.fail {
22+
color: red;
23+
position: absolute;
24+
left: 0;
25+
top: 1em;
26+
z-index: -1;
27+
}
28+
</style>
29+
<body>
30+
<p>There should be a green rectangle and no red.</p>
31+
<div class=container>
32+
<div>X&#x200B;X</div>
33+
<div class=fail>X</div>
34+
</div>
35+
</body>
36+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking sanity check</title>
5+
<meta name=assert content="sanity check: an unstyled span should not affect line breaking">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
.container {
19+
position: relative;
20+
}
21+
.fail {
22+
color: red;
23+
position: absolute;
24+
left: 0;
25+
top: 1em;
26+
z-index: -1;
27+
}
28+
</style>
29+
<body>
30+
<p>There should be a green rectangle and no red.</p>
31+
<div class=container>
32+
<div><span>X&#x200B;</span>X</div>
33+
<div class=fail>X</div>
34+
</div>
35+
</body>
36+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking sanity check 2</title>
5+
<meta name=assert content="sanity check: an unstyled span should not affect line breaking">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
.container {
19+
position: relative;
20+
}
21+
.fail {
22+
color: red;
23+
position: absolute;
24+
left: 0;
25+
top: 1em;
26+
z-index: -1;
27+
}
28+
</style>
29+
<body>
30+
<p>There should be a green rectangle and no red.</p>
31+
<div class=container>
32+
<div><span>X</span>&#x200B;X</div>
33+
<div class=fail>X</div>
34+
</div>
35+
</body>
36+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking sanity check 3</title>
5+
<meta name=assert content="sanity check: an unstyled span should not affect line breaking">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
.container {
19+
position: relative;
20+
}
21+
.fail {
22+
color: red;
23+
position: absolute;
24+
left: 0;
25+
top: 1em;
26+
z-index: -1;
27+
}
28+
</style>
29+
<body>
30+
<p>There should be a green rectangle and no red.</p>
31+
<div class=container>
32+
<div>X&#x200B;<span>X<span></div>
33+
<div class=fail>X</div>
34+
</div>
35+
</body>
36+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking sanity check 4</title>
5+
<meta name=assert content="sanity check: an unstyled span should not affect line breaking">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
.container {
19+
position: relative;
20+
}
21+
.fail {
22+
color: red;
23+
position: absolute;
24+
left: 0;
25+
top: 1em;
26+
z-index: -1;
27+
}
28+
</style>
29+
<body>
30+
<p>There should be a green rectangle and no red.</p>
31+
<div class=container>
32+
<div>X<span>&#x200B;X<span></div>
33+
<div class=fail>X</div>
34+
</div>
35+
</body>
36+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking sanity check 5</title>
5+
<meta name=assert content="sanity check: an unstyled span should not affect line breaking">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
.container {
19+
position: relative;
20+
}
21+
.fail {
22+
color: red;
23+
position: absolute;
24+
left: 0;
25+
top: 1em;
26+
z-index: -1;
27+
}
28+
</style>
29+
<body>
30+
<p>There should be a green rectangle and no red.</p>
31+
<div class=container>
32+
<div>X<span>&#x200B;</span>X</div>
33+
<div class=fail>X</div>
34+
</div>
35+
</body>
36+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking sanity check 6</title>
5+
<meta name=assert content="sanity check: an unstyled span should not affect line breaking">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
.container {
19+
position: relative;
20+
}
21+
.fail {
22+
color: red;
23+
position: absolute;
24+
left: 0;
25+
top: 1em;
26+
z-index: -1;
27+
}
28+
</style>
29+
<body>
30+
<p>There should be a green rectangle and no red.</p>
31+
<div class=container>
32+
<div><span>X&#x200B;</span><span>X</span></div>
33+
<div class=fail>X</div>
34+
</div>
35+
</body>
36+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking sanity check 7</title>
5+
<meta name=assert content="sanity check: an unstyled span should not affect line breaking">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
.container {
19+
position: relative;
20+
}
21+
.fail {
22+
color: red;
23+
position: absolute;
24+
left: 0;
25+
top: 1em;
26+
z-index: -1;
27+
}
28+
</style>
29+
<body>
30+
<p>There should be a green rectangle and no red.</p>
31+
<div class=container>
32+
<div><span>X</span><span>&#x200B;X</span></div>
33+
<div class=fail>X</div>
34+
</div>
35+
</body>
36+
</html>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking at element boundary</title>
5+
<meta name=assert content="For soft wrap opportunities defined by the boundary between two characters, the properties on nearest common ancestor of the two characters controls breaking.">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
span {
19+
white-space: pre;
20+
}
21+
.container {
22+
position: relative;
23+
}
24+
.fail {
25+
color: red;
26+
position: absolute;
27+
left: 0;
28+
top: 1em;
29+
z-index: -1;
30+
}
31+
</style>
32+
<body>
33+
<p>There should be a green rectangle and no red.</p>
34+
<div class=container>
35+
<div><span>X</span>&#x200B;<span>X</span></div>
36+
<div class=fail>X</div>
37+
</div>
38+
</body>
39+
</html>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Text — line breaking at element boundary 2</title>
5+
<meta name=assert content="For soft wrap opportunities defined by the boundary between two characters, the properties on nearest common ancestor of the two characters controls breaking.">
6+
<link rel=help href="https://www.w3.org/TR/css-text-3/#line-break-details">
7+
<link rel=match href="references/line-breaking-001-ref.html">
8+
<link rel=author title="Florian Rivoal" href="http://florian.rivoal.net">
9+
<style>
10+
div {
11+
color:green;
12+
width: 1em;
13+
line-height: 1em;
14+
font-family: ahem;
15+
white-space: normal;
16+
font-size: 20px;
17+
}
18+
span {
19+
white-space: pre;
20+
}
21+
.container {
22+
position: relative;
23+
}
24+
.fail {
25+
color: red;
26+
position: absolute;
27+
left: 0;
28+
top: 1em;
29+
z-index: -1;
30+
}
31+
</style>
32+
<body>
33+
<p>There should be a green rectangle and no red.</p>
34+
<div class=container>
35+
<div><span>X</span>&#x200B;X</div>
36+
<div class=fail>X</div>
37+
</div>
38+
</body>
39+
</html>

0 commit comments

Comments
 (0)