Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css3-writing-mode] added tests for vertical-align super, sub, middle.
- Loading branch information
Showing
11 changed files
with
352 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Writing Modes Test: vertical-align - 'top' and vertical-rl writing-mode</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> | ||
<link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> | ||
<meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'vertical-rl', 'text-orientation' is 'mixed', 'vertical-align' is 'super', the baseline of the box is shifted to the right." /> | ||
<meta name="flags" content="ahem" /> | ||
<style type="text/css"><![CDATA[ | ||
div#rl-mixed | ||
{ | ||
writing-mode: vertical-rl; | ||
font: 60px/3 Ahem; /* computes to 60px/180px */ | ||
color: orange; | ||
text-orientation: mixed; | ||
} | ||
|
||
span | ||
{ | ||
vertical-align: super; | ||
color: blue; | ||
margin-top: -1em; | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if there are an orange rectangle on the left and a blue square on the right.</p> | ||
|
||
<div id="rl-mixed">X<span>X</span></div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Writing Modes Test: vertical-align - 'top' and vertical-rl writing-mode</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> | ||
<link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> | ||
<meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'vertical-rl', 'text-orientation' is 'upright', 'vertical-align' is 'super', the baseline of the box is shifted to the right." /> | ||
<meta name="flags" content="ahem" /> | ||
<style type="text/css"><![CDATA[ | ||
div#rl-upright | ||
{ | ||
writing-mode: vertical-rl; | ||
font: 60px/3 Ahem; /* computes to 60px/180px */ | ||
color: orange; | ||
text-orientation: upright; | ||
} | ||
|
||
span | ||
{ | ||
vertical-align: super; | ||
color: blue; | ||
margin-top: -1em; | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if there are an orange rectangle on the left and a blue square on the right.</p> | ||
|
||
<div id="rl-upright">X<span>X</span></div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Writing Modes Test: vertical-align - 'top' and vertical-rl writing-mode</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> | ||
<link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> | ||
<meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'vertical-rl', 'text-orientation' is 'mixed', 'vertical-align' is 'sub', the baseline of the box is shifted to the left." /> | ||
<meta name="flags" content="ahem" /> | ||
<style type="text/css"><![CDATA[ | ||
div#rl-mixed | ||
{ | ||
writing-mode: vertical-rl; | ||
font: 60px/3 Ahem; /* computes to 60px/180px */ | ||
color: orange; | ||
text-orientation: mixed; | ||
} | ||
|
||
span | ||
{ | ||
vertical-align: sub; | ||
color: blue; | ||
margin-top: -1em; | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if there are a blue square on the left and an orange rectangle on the right.</p> | ||
|
||
<div id="rl-mixed">X<span>X</span></div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Writing Modes Test: vertical-align - 'top' and vertical-rl writing-mode</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> | ||
<link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> | ||
<meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'vertical-rl', 'text-orientation' is 'upright', 'vertical-align' is 'sub', the baseline of the box is shifted to the left." /> | ||
<meta name="flags" content="ahem" /> | ||
<style type="text/css"><![CDATA[ | ||
div#rl-upright | ||
{ | ||
writing-mode: vertical-rl; | ||
font: 60px/3 Ahem; /* computes to 60px/180px */ | ||
color: orange; | ||
text-orientation: upright; | ||
} | ||
|
||
span | ||
{ | ||
vertical-align: sub; | ||
color: blue; | ||
margin-top: -1em; | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if there are a blue square on the left and an orange rectangle on the right.</p> | ||
|
||
<div id="rl-upright">X<span>X</span></div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Writing Modes Test: vertical-align - 'top' and vertical-rl writing-mode</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> | ||
<link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> | ||
<meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'vertical-rl', 'text-orientation' is 'sideways', 'vertical-align' is 'sub', the baseline of the box is shifted to the left." /> | ||
<meta name="flags" content="ahem" /> | ||
<style type="text/css"><![CDATA[ | ||
div#rl-sideways | ||
{ | ||
writing-mode: vertical-rl; | ||
font: 60px/3 Ahem; /* computes to 60px/180px */ | ||
color: orange; | ||
text-orientation: sideways; | ||
} | ||
|
||
span | ||
{ | ||
vertical-align: sub; | ||
color: blue; | ||
margin-top: -1em; | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if there are a blue square on the left and an orange rectangle on the right.</p> | ||
|
||
<div id="rl-sideways">X<span>X</span></div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Reftest Reference</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<meta name="flags" content="image" /> | ||
<style type="text/css"><![CDATA[ | ||
img | ||
{ | ||
padding-left: 60px; | ||
vertical-align: top; | ||
} | ||
img + br + img | ||
{ | ||
padding-left: 108px; /* 60 px (padding-left) + 48 px (the position of small blue box)*/ | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if the <strong>right edge</strong> of an irregular polygon is straight and unbroken.</p> | ||
|
||
<div> | ||
<img class="blue" src="support/swatch-blue.png" width="60" height="60" alt="Image download support must be enabled" /><br/><img class="blue" src="support/swatch-blue.png" width="12" height="12" alt="Image download support must be enabled" /> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Writing Modes Test: vertical-align - 'top' and vertical-rl writing-mode</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> | ||
<link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> | ||
<meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'vertical-rl', 'text-orientation' is 'upright', 'vertical-align' is 'middle', the vertical midpoint of the box is aligned with the central baseline of the parent box plus half the x-height of the parent." /> | ||
<link rel="match" href="vertical-alignment-022-ref.xht" /> | ||
<meta name="flags" content="ahem" /> | ||
<style type="text/css"><![CDATA[ | ||
div#rl-upright | ||
{ | ||
writing-mode: vertical-rl; | ||
font: 60px/3 Ahem; /* computes to 60px/180px */ | ||
color: blue; | ||
text-orientation: upright; | ||
} | ||
|
||
span | ||
{ | ||
font-size: 0.2em; | ||
vertical-align: middle; | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if the <strong>right edge</strong> of an irregular polygon is straight and unbroken.</p> | ||
|
||
<div id="rl-upright">X<span>X</span></div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Writing Modes Test: vertical-align - 'top' and vertical-rl writing-mode</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> | ||
<link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> | ||
<meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'vertical-rl', 'text-orientation' is 'upright', 'vertical-align' is 'middle', the vertical midpoint of the box is aligned with the central baseline of the parent box plus half the x-height of the parent." /> | ||
<link rel="match" href="vertical-alignment-022-ref.xht" /> | ||
<meta name="flags" content="ahem" /> | ||
<style type="text/css"><![CDATA[ | ||
div#rl-mixed | ||
{ | ||
writing-mode: vertical-rl; | ||
font: 60px/3 Ahem; /* computes to 60px/180px */ | ||
color: blue; | ||
text-orientation: mixed; | ||
} | ||
|
||
span | ||
{ | ||
font-size: 0.2em; | ||
vertical-align: middle; | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if the <strong>right edge</strong> of an irregular polygon is straight and unbroken.</p> | ||
|
||
<div id="rl-mixed">X<span>X</span></div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Reftest Reference</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<meta name="flags" content="image" /> | ||
<style type="text/css"><![CDATA[ | ||
img | ||
{ | ||
padding-left: 60px; | ||
vertical-align: top; | ||
} | ||
img + br + img | ||
{ | ||
padding-left: 72px; /* 60 px (padding-left) + 12 px (the position of small blue box)*/ | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if the <strong>right edge</strong> of an irregular polygon is straight and unbroken.</p> | ||
|
||
<div> | ||
<img class="blue" src="support/swatch-blue.png" width="60" height="60" alt="Image download support must be enabled" /><br/><img class="blue" src="support/swatch-blue.png" width="48" height="48" alt="Image download support must be enabled" /> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Writing Modes Test: vertical-align - 'top' and vertical-rl writing-mode</title> | ||
<link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> | ||
<link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> | ||
<link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> | ||
<meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'vertical-rl', 'text-orientation' is 'sideways, 'vertical-align' is 'middle', the vertical midpoint of the box is aligned with the central baseline of the parent box plus half the x-height of the parent." /> | ||
<link rel="match" href="vertical-alignment-026-ref.xht" /> | ||
<meta name="flags" content="ahem" /> | ||
<style type="text/css"><![CDATA[ | ||
div#rl-sideways | ||
{ | ||
writing-mode: vertical-rl; | ||
font: 60px/3 Ahem; /* computes to 60px/180px */ | ||
color: blue; | ||
text-orientation: sideways; | ||
} | ||
|
||
span | ||
{ | ||
font-size: 0.8em; | ||
vertical-align: middle; | ||
} | ||
]]></style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Test passes if the <strong>right edge</strong> of an irregular polygon is straight and unbroken.</p> | ||
|
||
<div id="rl-sideways">X<span>X</span></div> | ||
|
||
</body> | ||
</html> |