Bug 1258916 part 11 - Import CSS Writing Modes test from CSSWG test repo. r=jfkthame

MozReview-Commit-ID: LCR3xtk3Wd0

--HG--
extra : source : daf91ab168b901f37ad80c39cb9a7bcb8efe16b6
This commit is contained in:
Xidorn Quan 2016-12-15 00:10:08 +11:00
Родитель f978bf206a
Коммит ea2da9e68b
1136 изменённых файлов: 72631 добавлений и 1 удалений

Просмотреть файл

@ -11,6 +11,9 @@
# of this, an item could have zero <failure-type>, which indicates it
# is expected to pass, and override failure rule above it.
#### Selectors 4 ####################################################
# focus-within
needs-focus selectors-4/focus-within-00*.html
pref(dom.webcomponents.enabled,true) needs-focus selectors-4/focus-within-shadow-*.html
@ -18,6 +21,9 @@ pref(dom.webcomponents.enabled,true) needs-focus selectors-4/focus-within-shadow
# Bug 1208113
fails needs-focus selectors-4/focus-within-shadow-001.html
#### CSS Values 3 ####################################################
# Fuzzy
fuzzy-if(OSX,40,6) css-values-3/ch-unit-001.html
@ -37,6 +43,104 @@ skip css-values-3/vh_not_refreshing_on_chrome_iframe.html
skip css-values-3/vh-support-transform-origin.html
skip css-values-3/vh-support-transform-translate.html
#### CSS Writing Modes 3 #############################################
# Fuzzy
fuzzy-if(OSX||winWidget,255,480) css-writing-modes-3/abs-pos-non-replaced-v??-???.xht
fuzzy-if(OSX||winWidget,93,600) css-writing-modes-3/baseline-inline-non-replaced-00?.xht
fuzzy-if(OSX||winWidget,213,1540) css-writing-modes-3/block-flow-direction-???-0??.xht
fuzzy-if(OSX,255,200) css-writing-modes-3/box-offsets-rel-pos-vlr-005.xht
fuzzy-if(OSX,255,200) css-writing-modes-3/box-offsets-rel-pos-vrl-004.xht
fuzzy-if(OSX||winWidget,93,300) css-writing-modes-3/caption-side-v??-00?.xht
fuzzy-if(OSX||winWidget,215,780) css-writing-modes-3/central-baseline-alignment-00?.xht
fuzzy-if(OSX||winWidget,75,404) css-writing-modes-3/direction-v??-00?.xht
fuzzy-if(OSX||winWidget,103,902) css-writing-modes-3/float-contiguous-v??-01?.xht
fuzzy-if(OSX||winWidget,93,300) css-writing-modes-3/float-shrink-to-fit-vlr-009.xht
fuzzy-if(OSX||winWidget,93,300) css-writing-modes-3/float-shrink-to-fit-vrl-008.xht
fuzzy-if(OSX||winWidget,93,300) css-writing-modes-3/float-v??-0??.xht
fuzzy-if(OSX||winWidget,62,404) css-writing-modes-3/height-width-inline-non-replaced-v??-00?.xht
fuzzy-if(OSX||winWidget,218,621) css-writing-modes-3/inline-block-alignment-orthogonal-v??-00?.xht
fuzzy-if(OSX||winWidget,104,1080) css-writing-modes-3/inline-block-alignment-slr-009.xht
fuzzy-if(OSX||winWidget,111,960) css-writing-modes-3/inline-block-alignment-srl-008.xht
fuzzy-if(OSX||winWidget,213,1540) css-writing-modes-3/line-box-direction-???-0??.xht
fuzzy-if(OSX||winWidget,110,1200) css-writing-modes-3/row-progression-???-0??.xht
fuzzy-if(OSX||winWidget,110,1200) css-writing-modes-3/table-column-order-00?.xht
fuzzy-if(winWidget,110,1200) css-writing-modes-3/table-column-order-slr-007.xht
fuzzy-if(OSX||winWidget,110,1200) css-writing-modes-3/table-column-order-srl-006.xht
fuzzy-if(OSX||winWidget,75,404) css-writing-modes-3/text-align-v??-0??.xht
fuzzy-if(OSX||winWidget,215,780) css-writing-modes-3/text-baseline-???-00?.xht
fuzzy-if(OSX,15,16) css-writing-modes-3/text-combine-upright-decorations-001.html
fuzzy-if(OSX||winWidget,255,480) css-writing-modes-3/text-indent-v??-0??.xht
fuzzy-if(OSX||winWidget,226,960) css-writing-modes-3/text-orientation-016.xht
fuzzy-if(OSX||winWidget,223,720) css-writing-modes-3/vertical-alignment-*.xht
fuzzy-if(OSX||winWidget,153,612) css-writing-modes-3/writing-mode-vertical-??-00?.*
fuzzy(255,960) css-writing-modes-3/text-combine-upright-value-all-00?.html
# Bug 1167911
skip css-writing-modes-3/abs-pos-non-replaced-icb-vlr-021.xht
skip css-writing-modes-3/abs-pos-non-replaced-icb-vrl-020.xht
# Bug 1244601
fails css-writing-modes-3/block-flow-direction-slr-058.xht
fails css-writing-modes-3/block-flow-direction-srl-057.xht
fails css-writing-modes-3/block-flow-direction-vlr-018.xht
fails css-writing-modes-3/block-flow-direction-vrl-017.xht
# Bug 1185430
fails css-writing-modes-3/contiguous-floated-table-vlr-00?.xht
fails css-writing-modes-3/contiguous-floated-table-vrl-00?.xht
fails css-writing-modes-3/table-progression-slr-002.html
fails css-writing-modes-3/table-progression-srl-002.html
fails css-writing-modes-3/table-progression-vlr-00?.html
css-writing-modes-3/table-progression-vlr-001.html
fails css-writing-modes-3/table-progression-vrl-00?.html
css-writing-modes-3/table-progression-vrl-001.html
fails css-writing-modes-3/flexbox_align-items-stretch-writing-modes.html
# Bug 1179952
fails css-writing-modes-3/inline-block-alignment-00?.xht
fuzzy-if(OSX||winWidget,111,960) css-writing-modes-3/inline-block-alignment-006.xht
fails css-writing-modes-3/inline-table-alignment-00?.xht
# Bug 1227616
random css-writing-modes-3/line-box-direction-slr-056.xht
random css-writing-modes-3/line-box-direction-srl-055.xht
random css-writing-modes-3/line-box-direction-vlr-016.xht
random css-writing-modes-3/line-box-direction-vrl-015.xht
# Bug 1220352
fails css-writing-modes-3/line-box-height-vlr-003.xht
fails css-writing-modes-3/line-box-height-vlr-005.xht
fails css-writing-modes-3/line-box-height-vlr-011.xht
fails css-writing-modes-3/line-box-height-vlr-013.xht
fails css-writing-modes-3/line-box-height-vlr-021.xht
fails css-writing-modes-3/line-box-height-vlr-023.xht
fails css-writing-modes-3/line-box-height-vrl-002.xht
fails css-writing-modes-3/line-box-height-vrl-004.xht
fails css-writing-modes-3/line-box-height-vrl-010.xht
fails css-writing-modes-3/line-box-height-vrl-012.xht
# Bug 1258635 - text-combine-upright: digits
# Using skip because there are mismatch tests which would unexpectedly
# pass with "fails".
skip css-writing-modes-3/full-width-003.html
skip css-writing-modes-3/text-combine-upright-value-digits?-001.html
skip css-writing-modes-3/text-combine-upright-value-digits?-002.html
# Bug 1220353
fails css-writing-modes-3/vertical-alignment-vlr-023.xht
fails css-writing-modes-3/vertical-alignment-vlr-025.xht
fails css-writing-modes-3/vertical-alignment-vrl-022.xht
fails css-writing-modes-3/vertical-alignment-vrl-024.xht
# Bug 1102175
fails css-writing-modes-3/wm-propagation-body-*.xht
#### CSS Multi-column 1 ##############################################
# Fuzzy annotations for multicol tests are due to AA differences.
# Fails annotations need to be triaged later. (Bug 1299006)
fails css-multicol-1/multicol-block-clip-001.xht

Просмотреть файл

@ -34,6 +34,7 @@ gSubtrees = [
os.path.join("css-conditional-3"),
os.path.join("css-values-3"),
os.path.join("css-multicol-1"),
os.path.join("css-writing-modes-3"),
os.path.join("selectors-4"),
]

Просмотреть файл

@ -0,0 +1,108 @@
<!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: position absolute and 'vertical-lr' - 'left: auto', 'width: auto' and 'right: auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'left: auto', 'width: auto' and 'right: auto') whose containing block is the initial containing block must set 'left' to the static position. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
html
{
direction: ltr;
}
div#green-overlapping-test
{
border-left: green solid 25px;
border-right: green solid 75px;
height: 100px;
left: auto;
position: absolute;
right: auto;
width: auto;
writing-mode: vertical-lr;
}
/*
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
(...)
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
10.3.7 Absolutely positioned, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
So:
auto : left
+
0px : margin-left
+
25px : border-left-width
+
0px : padding-left
+
auto : width
+
0px : padding-right
+
75px : border-right-width
+
0px : margin-right
+
auto : right
====================
: width of containing block (width of Initial Containing Block)
becomes
8px : left
+
0px : margin-left
+
25px : border-left-width
+
0px : padding-left
+
0px : width (shrink-to-fit)
+
0px : padding-right
+
75px : border-right-width
+
0px : margin-right
+
solve : right
====================
: width of containing block (width of Initial Containing Block)
*/
div#red-overlapped-reference
{
background-color: red;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="green-overlapping-test"></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,118 @@
<!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: position absolute and 'vertical-lr' - 'left: auto', 'width: auto' and 'right: auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-004-ref.xht" />
<meta content="image" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'left: auto', 'width: auto' and 'right: auto') whose containing block is the initial containing block must set 'right' to the static position. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
html
{
direction: rtl;
}
img
{
vertical-align: top;
}
div#green-overlapping-test
{
border-left: green solid 25px;
border-right: green solid 75px;
height: 100px;
left: auto;
position: absolute;
right: auto;
width: auto;
writing-mode: vertical-lr;
}
/*
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
(...)
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
10.3.7 Absolutely positioned, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
So:
auto : left
+
0px : margin-left
+
25px : border-left-width
+
0px : padding-left
+
auto : width
+
0px : padding-right
+
75px : border-right-width
+
0px : margin-right
+
auto : right
====================
: width of containing block (width of Initial Containing Block)
becomes
solve : left
+
0px : margin-left
+
25px : border-left-width
+
0px : padding-left
+
0px : width (shrink-to-fit)
+
0px : padding-right
+
75px : border-right-width
+
0px : margin-right
+
8px : right
====================
: width of containing block (width of Initial Containing Block)
*/
div#red-overlapped-reference
{
background-color: red;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<!--
The image says:
Test passes if there is a filled green square and <strong>no red</strong>.
-->
<div id="green-overlapping-test"></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'left' and 'width' are 'auto', 'right' is not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'left' and 'width' are 'auto' and 'right' is not 'auto') whose containing block is the initial containing block must set width to shrink-to-fit and then solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 500px divided by 5 == 100px (width of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: auto;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-007.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'left' and 'width' are 'auto', 'right' is not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'left' and 'width' are 'auto' and 'right' is not 'auto') whose containing block is the initial containing block must set width to shrink-to-fit and then solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 500px divided by 5 == 100px (width of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-009.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,107 @@
<!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: position absolute and 'vertical-lr' - 'left' and 'right' are 'auto' and 'width' is not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'left' and 'right' are 'auto' and 'width' is not 'auto') whose containing block is the initial containing block and whose direction is 'ltr' must set left to static position and then solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
html
{
direction: ltr;
}
div#green-overlapping-test
{
background-color: green;
border-left: green solid 35px;
border-right: green solid 15px;
height: 100px;
left: auto;
position: absolute;
right: auto;
width: 50px;
writing-mode: vertical-lr;
}
/*
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position (...) Then solve for (...) 'right' (if 'direction' is 'ltr').
"
10.3.7 Absolutely positioned, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
So:
auto : left
+
0px : margin-left
+
35px : border-left-width
+
0px : padding-left
+
50px : width
+
0px : padding-right
+
15px : border-right-width
+
0px : margin-right
+
auto : right
====================
: width of containing block (width of Initial Containing Block)
becomes
8px : left (set to static position)
+
0px : margin-left
+
35px : border-left-width
+
0px : padding-left
+
50px : width
+
0px : padding-right
+
15px : border-right-width
+
0px : margin-right
+
solve : right
====================
: width of containing block (width of Initial Containing Block)
*/
div#red-overlapped-reference
{
background-color: red;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="green-overlapping-test"></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,117 @@
<!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: position absolute and 'vertical-lr' - 'left' and 'right' are 'auto', 'width' is not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-004-ref.xht" />
<meta content="image" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'left' and 'right' are 'auto', 'width' is not 'auto') whose containing block is the initial containing block and whose direction is 'rtl' must set right to static position and then solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
html
{
direction: rtl;
}
img
{
vertical-align: top;
}
div#green-overlapping-test
{
background-color: green;
border-left: green solid 35px;
border-right: green solid 15px;
height: 100px;
left: auto;
position: absolute;
right: auto;
width: 50px;
writing-mode: vertical-lr;
}
/*
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'rtl' set 'right' to the static position (...) Then solve for 'left' (if 'direction is 'rtl').
"
10.3.7 Absolutely positioned, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
So:
auto : left
+
0px : margin-left
+
35px : border-left-width
+
0px : padding-left
+
50px : width
+
0px : padding-right
+
15px : border-right-width
+
0px : margin-right
+
auto : right (set to static position)
====================
: width of containing block (width of Initial Containing Block)
becomes
solve : left
+
0px : margin-left
+
35px : border-left-width
+
0px : padding-left
+
50px : width
+
0px : padding-right
+
15px : border-right-width
+
0px : margin-right
+
8px : right (static position)
====================
: width of containing block (width of Initial Containing Block)
*/
div#red-overlapped-reference
{
background-color: red;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<!--
The image says:
Test passes if there is a filled green square and <strong>no red</strong>.
-->
<div id="green-overlapping-test"></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'width' and 'right' are 'auto' and 'left' is not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'width' and 'right' are 'auto' and 'left' is not 'auto') whose containing block is the initial containing block must set width to shrink-to-fit and then solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 60% of 500px == 300px (offset of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-015.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'width' and 'right' are 'auto' and 'left' is not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'width' and 'right' are 'auto' and 'left' is not 'auto') whose containing block is the initial containing block must set width to shrink-to-fit and then solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 60% of 500px == 300px (offset of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-017.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'left' is 'auto', 'width' and 'right' are not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'left' is 'auto', 'width' and 'right' are not 'auto') whose containing block is the initial containing block must solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 500px divided by 5 == 100px (width of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: auto;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-019.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'left' is 'auto', 'width' and 'right' are not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'left' is 'auto', 'width' and 'right' are not 'auto') whose containing block is the initial containing block must solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 500px divided by 5 == 100px (width of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: auto;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-021.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'width' is 'auto', 'left' and 'right' are not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'width' is 'auto', 'left' and 'right' are not 'auto') whose containing block is the initial containing block must solve 'width'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-023.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'width' is 'auto', 'left' and 'right' are not 'auto' with direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'width' is 'auto', 'left' and 'right' are not 'auto') whose containing block is the initial containing block must solve 'width'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-025.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'right' is 'auto', 'left' and 'width' are not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'right' is 'auto', 'left' and 'width' are not 'auto') whose containing block is the initial containing block must solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-027.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - 'right' is 'auto', 'left' and 'width' are not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'right' is 'auto', 'left' and 'width' are not 'auto') whose containing block is the initial containing block must solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-029.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - overconstrained values with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with overconstrained 'left', 'width' and 'right' values) whose containing block is the initial containing block must ignore the value for 'right' and solve for that value. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-031.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-lr' - overconstrained values with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with overconstrained 'left', 'width' and 'right' values) whose containing block is the initial containing block must ignore the value for 'left' and solve for that value. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vlr-033.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,108 @@
<!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: position absolute and 'vertical-rl' - 'left: auto', 'width: auto' and 'right: auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'left: auto', 'width: auto' and 'right: auto') whose containing block is the initial containing block must set 'left' to the static position. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
html
{
direction: ltr;
}
div#green-overlapping-test
{
border-left: green solid 25px;
border-right: green solid 75px;
height: 100px;
left: auto;
position: absolute;
right: auto;
width: auto;
writing-mode: vertical-rl;
}
/*
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
(...)
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
10.3.7 Absolutely positioned, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
So:
auto : left
+
0px : margin-left
+
25px : border-left-width
+
0px : padding-left
+
auto : width
+
0px : padding-right
+
75px : border-right-width
+
0px : margin-right
+
auto : right
====================
: width of containing block (width of Initial Containing Block)
becomes
8px : left
+
0px : margin-left
+
25px : border-left-width
+
0px : padding-left
+
0px : width (shrink-to-fit)
+
0px : padding-right
+
75px : border-right-width
+
0px : margin-right
+
solve : right
====================
: width of containing block (width of Initial Containing Block)
*/
div#red-overlapped-reference
{
background-color: red;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="green-overlapping-test"></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,37 @@
<!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="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<meta content="image" name="flags" />
<style type="text/css"><![CDATA[
body
{
direction: rtl;
}
img
{
vertical-align: top;
}
img#green-square
{
position: relative;
top: 16px;
}
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /><br /><img id="green-square" src="support/swatch-green.png" width="100" height="100" alt="Image download support must be enabled" /></p>
</body>
</html>

Просмотреть файл

@ -0,0 +1,118 @@
<!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: position absolute and 'vertical-rl' - 'left: auto', 'width: auto' and 'right: auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-004-ref.xht" />
<meta content="image" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'left: auto', 'width: auto' and 'right: auto') whose containing block is the initial containing block must set 'right' to the static position. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
html
{
direction: rtl;
}
img
{
vertical-align: top;
}
div#green-overlapping-test
{
border-left: green solid 25px;
border-right: green solid 75px;
height: 100px;
left: auto;
position: absolute;
right: auto;
width: auto;
writing-mode: vertical-rl;
}
/*
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
(...)
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
10.3.7 Absolutely positioned, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
So:
auto : left
+
0px : margin-left
+
25px : border-left-width
+
0px : padding-left
+
auto : width
+
0px : padding-right
+
75px : border-right-width
+
0px : margin-right
+
auto : right
====================
: width of containing block (width of Initial Containing Block)
becomes
solve : left
+
0px : margin-left
+
25px : border-left-width
+
0px : padding-left
+
0px : width (shrink-to-fit)
+
0px : padding-right
+
75px : border-right-width
+
0px : margin-right
+
8px : right
====================
: width of containing block (width of Initial Containing Block)
*/
div#red-overlapped-reference
{
background-color: red;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<!--
The image says:
Test passes if there is a filled green square and <strong>no red</strong>.
-->
<div id="green-overlapping-test"></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'left' and 'width' are 'auto', 'right' is not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'left' and 'width' are 'auto' and 'right' is not 'auto') whose containing block is the initial containing block must set width to shrink-to-fit and then solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 500px divided by 5 == 100px (width of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: auto;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-006.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -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="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
div
{
background-color: green;
height: 100px;
margin-left: 300px;
width: 100px;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'left' and 'width' are 'auto', 'right' is not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'left' and 'width' are 'auto' and 'right' is not 'auto') whose containing block is the initial containing block must set width to shrink-to-fit and then solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 500px divided by 5 == 100px (width of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-008.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,107 @@
<!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: position absolute and 'vertical-rl' - 'left' and 'right' are 'auto', 'width' is not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'left' and 'right' are 'auto', 'width' is not 'auto') whose containing block is the initial containing block and whose direction is 'ltr' must set left to static position and then solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
html
{
direction: ltr;
}
div#green-overlapping-test
{
background-color: green;
border-left: green solid 35px;
border-right: green solid 15px;
height: 100px;
left: auto;
position: absolute;
right: auto;
width: 50px;
writing-mode: vertical-rl;
}
/*
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position (...) Then solve for (...) 'right' (if 'direction' is 'ltr').
"
10.3.7 Absolutely positioned, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
So:
auto : left
+
0px : margin-left
+
35px : border-left-width
+
0px : padding-left
+
50px : width
+
0px : padding-right
+
15px : border-right-width
+
0px : margin-right
+
auto : right
====================
: width of containing block (width of Initial Containing Block)
becomes
8px : left (set to static position)
+
0px : margin-left
+
35px : border-left-width
+
0px : padding-left
+
50px : width
+
0px : padding-right
+
15px : border-right-width
+
0px : margin-right
+
solve : right
====================
: width of containing block (width of Initial Containing Block)
*/
div#red-overlapped-reference
{
background-color: red;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="green-overlapping-test"></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,117 @@
<!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: position absolute and 'vertical-rl' - 'left' and 'right' are 'auto', 'width' is not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-004-ref.xht" />
<meta content="image" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'left' and 'right' are 'auto', 'width' is not 'auto') whose containing block is the initial containing block and whose direction is 'rtl' must set right to static position and then solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
html
{
direction: rtl;
}
img
{
vertical-align: top;
}
div#green-overlapping-test
{
background-color: green;
border-left: green solid 35px;
border-right: green solid 15px;
height: 100px;
left: auto;
position: absolute;
right: auto;
width: 50px;
writing-mode: vertical-rl;
}
/*
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'rtl' set 'right' to the static position (...) Then solve for 'left' (if 'direction is 'rtl').
"
10.3.7 Absolutely positioned, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
So:
auto : left
+
0px : margin-left
+
35px : border-left-width
+
0px : padding-left
+
50px : width
+
0px : padding-right
+
15px : border-right-width
+
0px : margin-right
+
auto : right (set to static position)
====================
: width of containing block (width of Initial Containing Block)
becomes
solve : left
+
0px : margin-left
+
35px : border-left-width
+
0px : padding-left
+
50px : width
+
0px : padding-right
+
15px : border-right-width
+
0px : margin-right
+
8px : right (static position)
====================
: width of containing block (width of Initial Containing Block)
*/
div#red-overlapped-reference
{
background-color: red;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<!--
The image says:
Test passes if there is a filled green square and <strong>no red</strong>.
-->
<div id="green-overlapping-test"></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'width' and 'right' are 'auto' and 'left' is not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'width' and 'right' are 'auto' and 'left' is not 'auto') whose containing block is the initial containing block must set width to shrink-to-fit and then solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 60% of 500px == 300px (offset of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-014.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'width' and 'right' are 'auto' and 'left' is not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'width' and 'right' are 'auto' and 'left' is not 'auto') whose containing block is the initial containing block must set width to shrink-to-fit and then solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 60% of 500px == 300px (offset of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-016.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'left' is 'auto', 'width' and 'right' are not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'left' is 'auto', 'width' and 'right' are not 'auto') whose containing block is the initial containing block must solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 500px divided by 5 == 100px (width of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: auto;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-018.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'left' is 'auto', 'width' and 'right' are not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'left' is 'auto', 'width' and 'right' are not 'auto') whose containing block is the initial containing block must solve for 'left'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px; /* 500px divided by 5 == 100px (width of green square) */
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: auto;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-020.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'width' is 'auto', 'left' and 'right' are not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'width' is 'auto', 'left' and 'right' are not 'auto') whose containing block is the initial containing block must solve 'width'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-022.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'width' is 'auto', 'left' and 'right' are not 'auto' with direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'width' is 'auto', 'left' and 'right' are not 'auto') whose containing block is the initial containing block must solve 'width'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-024.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'right' is 'auto', 'left' and 'width' are not 'auto' with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with 'right' is 'auto', 'left' and 'width' are not 'auto') whose containing block is the initial containing block must solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-026.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - 'right' is 'auto', 'left' and 'width' are not 'auto' with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with 'right' is 'auto', 'left' and 'width' are not 'auto') whose containing block is the initial containing block must solve for 'right'. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-028.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - overconstrained values with 'direction: ltr' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'ltr', then an absolutely positioned box (with overconstrained 'left', 'width' and 'right' values) whose containing block is the initial containing block must ignore the value for 'right' and solve for that value. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-030.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!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: position absolute and 'vertical-rl' - overconstrained values with 'direction: rtl' in initial containing block</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="match" href="abs-pos-non-replaced-icb-vrl-008-ref.xht" />
<meta content="" name="flags" />
<meta content="This test checks that when the initial containing block's writing-mode is 'horizontal-tb' and its 'direction' is 'rtl', then an absolutely positioned box (with overconstrained 'left', 'width' and 'right' values) whose containing block is the initial containing block must ignore the value for 'left' and solve for that value. Whether such absolutely positioned box's 'writing-mode' is vertical or not is irrelevant." name="assert" />
<style type="text/css"><![CDATA[
object#overlapping-green
{
height: 116px;
width: 500px;
vertical-align: top;
}
div#red-overlapped-reference
{
background-color: red;
bottom: 116px;
height: 100px;
left: 300px;
position: relative;
width: 100px;
z-index: -1;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div><object data="support/embedded-doc-abs-pos-non-replaced-icb-vrl-032.html" type="text/html" id="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
<div id="red-overlapped-reference"></div>
</body>
</html>

Просмотреть файл

@ -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="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<meta content="image" name="flags" />
<style type="text/css"><![CDATA[
img#green-square
{
left: 80px;
position: relative;
top: 160px;
}
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div><img id="green-square" src="support/swatch-green.png" width="80" height="80" alt="Image download support must be enabled" /></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,121 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are 'auto', then set 'top' to the static position, then the height is based on the content and then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
gives us:
160px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,113 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vrl-004-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' and 'right' are 'auto', then set 'left' to the static position, the width becomes shrink-to-fit and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-3col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: auto;
writing-mode: vertical-lr;
}
/*
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
160px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
160px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<!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="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<meta content="image" name="flags" />
<style type="text/css"><![CDATA[
div
{
margin-left: 0.5em;
}
img
{
vertical-align: top;
}
img#green-square
{
position: relative;
left: 96px; /* 80px + p's margin-left (1em) */
top: 160px;
}
]]></style>
</head>
<body>
<div><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /><img id="green-square" src="support/swatch-green.png" width="80" height="80" alt="Image download support must be enabled" /></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,126 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are 'auto', then set 'top' to the static position, then the height is based on the content and then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
gives us:
160px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -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="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<meta content="image" name="flags" />
<style type="text/css"><![CDATA[
img#green-square
{
left: 80px;
position: relative;
top: 80px;
}
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div><img id="green-square" src="support/swatch-green.png" width="80" height="80" alt="Image download support must be enabled" /></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,121 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are 'auto', then set 'bottom' to the static position, the height is based on the content and then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom: auto: set to static position
=====================
320px : height of containing block
gives us:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom: auto: set to static position
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,113 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'left', 'width' and 'right' are 'auto', then set 'right' to the static position, the width becomes shrink-to-fit and then solve for 'left'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: auto;
writing-mode: vertical-lr;
}
/*
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
(solve) : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right: auto: set to static position
=====================
320px : width of containing block
gives us:
(solve) : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right: auto: set to static position
=====================
320px : width of containing block
And so computed left value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<!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="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<meta content="image" name="flags" />
<style type="text/css"><![CDATA[
div
{
margin-left: 0.5em;
}
img
{
vertical-align: top;
}
img#green-square
{
position: relative;
left: 96px; /* 80px + p's margin-left (1em) */
top: 80px;
}
]]></style>
</head>
<body>
<div><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /><img id="green-square" src="support/swatch-green.png" width="80" height="80" alt="Image download support must be enabled" /></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,125 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are 'auto', then set 'bottom' to the static position, the height is based on the content and then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below.
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom: auto: set to static position
=====================
320px : height of containing block
gives us:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom: auto: set to static position
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,119 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' are 'auto' and bottom is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' are 'auto' and bottom is not 'auto', then the height is based on the content and then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: 2em;
color: green;
height: auto;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
gives us:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width becomes shrink-to-fit and then solve for 'left'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: 2em;
width: auto;
writing-mode: vertical-lr;
}
/*
"
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
(solve) : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right
=====================
320px : width of containing block
gives us:
(solve) : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right
=====================
320px : width of containing block
And so computed left value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,123 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content and then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: 2em;
color: green;
height: auto;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
gives us:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,119 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto and 'bottom' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content and then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: 2em;
color: green;
height: auto;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
gives us:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width becomes shrink-to-fit and then solve for 'left'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: 2em;
width: auto;
writing-mode: vertical-lr;
}
/*
"
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
(solve) : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right
=====================
320px : width of containing block
gives us:
(solve) : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right
=====================
320px : width of containing block
And so computed left value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,123 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' are 'auto' and bottom is not 'auto', then the height is based on the content and then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: 2em;
color: green;
height: auto;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
gives us:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,97 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: 1em;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr').
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vrl-004-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto', then set 'left' to the static position and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-3col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: 1em;
writing-mode: vertical-lr;
}
/*
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr').
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
160px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
160px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,102 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: 1em;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr').
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,97 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto and 'height' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: 1em;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr').
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom: auto: set to static position
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,89 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto', then set 'right' to the static position and then solve for 'left'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: 1em;
writing-mode: vertical-lr;
}
/*
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr').
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
(solve) : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right: auto
=====================
320px : width of containing block
And so computed left value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,101 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: 1em;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr').
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom: auto: set to static position
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,119 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
gives us:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,112 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width becomes shrink-to-fit and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: 1em;
position: absolute;
right: auto;
width: auto;
writing-mode: vertical-lr;
}
/*
"
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
80px : left
+
0px : margin-left
+
0px : border-top-width
+
0px : padding-top
+
80px : (shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,123 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
gives us:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,119 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
gives us:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width becomes shrink-to-fit and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: 1em;
position: absolute;
right: auto;
width: auto;
writing-mode: vertical-lr;
}
/*
"
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
80px : left
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (shrink-to-fit) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,123 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
gives us:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on the content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,97 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: 1em;
color: green;
height: 1em;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom
=====================
320px : height of containing block
And so computed top value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,89 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vrl-004-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-3col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: 1em;
width: 1em;
writing-mode: vertical-lr;
}
/*
"
4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
(solve) : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
80px : right
=====================
320px : width of containing block
And so computed left value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,101 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: 1em;
color: green;
height: 1em;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom
=====================
320px : height of containing block
And so computed top value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,97 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: 1em;
color: green;
height: 1em;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom
=====================
320px : height of containing block
And so computed top value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,89 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vrl-004-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-3col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: 1em;
width: 1em;
writing-mode: vertical-lr;
}
/*
"
4.'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
(solve) : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
80px : right
=====================
320px : width of containing block
And so computed left value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,102 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: 1em;
color: green;
height: 1em;
position: absolute;
top: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom
=====================
320px : height of containing block
And so computed top value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,97 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: green;
bottom: 1em;
height: auto;
position: absolute;
top: 2em;
width: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(solve) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom
=====================
320px : height of containing block
And so computed height value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span></span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,89 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vrl-004-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-3col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: green;
height: 1em;
left: 2em;
position: absolute;
right: 1em;
width: auto;
writing-mode: vertical-lr;
}
/*
"
5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
160px : left: auto
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(solve) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
80px : right: auto
=====================
320px : width of containing block
And so computed width value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span></span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,101 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: green;
bottom: 1em;
height: auto;
position: absolute;
top: 2em;
width: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(solve) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom
=====================
320px : height of containing block
And so computed height value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span></span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,97 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: green;
bottom: 1em;
height: auto;
position: absolute;
top: 2em;
width: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(solve) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom
=====================
320px : height of containing block
And so computed height value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span></span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,89 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vrl-004-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-3col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: green;
height: 1em;
left: 2em;
position: absolute;
right: 1em;
width: auto;
writing-mode: vertical-lr;
}
/*
"
5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
160px : left
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(solve) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
80px : right
=====================
320px : width of containing block
And so computed width value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span></span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,101 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: green;
bottom: 1em;
height: auto;
position: absolute;
top: 2em;
width: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(solve) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom
=====================
320px : height of containing block
And so computed height value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span></span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,97 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: 1em;
position: absolute;
top: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,89 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: 1em;
position: absolute;
right: auto;
width: 1em;
writing-mode: vertical-lr;
}
/*
"
6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,101 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: 1em;
position: absolute;
top: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,97 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: 1em;
position: absolute;
top: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,89 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'" />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: 1em;
position: absolute;
right: auto;
width: 1em;
writing-mode: vertical-lr;
}
/*
"
6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,101 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: 1em;
position: absolute;
top: 1em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,121 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'bottom' and solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: 2em;
color: green;
height: 1em;
margin-bottom: 0em;
margin-top: 0em;
position: absolute;
top: 2em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value.
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
gives us:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom
=====================
320px : height of containing block
And so computed bottom value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,113 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vrl-004-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained), then ignore 'right' and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-3col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: 2em;
margin-left: 0em;
margin-right: 0em;
position: absolute;
right: 2em;
width: 1em;
writing-mode: vertical-lr;
}
/*
"
If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value.
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
160px : left
+
0px : margin-left
+
0px : border-top-width
+
0px : padding-top
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right
=====================
320px : width of containing block
gives us:
160px : left
+
0px : margin-left
+
0px : border-top-width
+
0px : padding-top
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right
=====================
320px : width of containing block
And so computed right value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,125 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'bottom' and solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: 2em;
color: green;
height: 1em;
margin-bottom: 0em;
margin-top: 0em;
position: absolute;
top: 2em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value.
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
gives us:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom
=====================
320px : height of containing block
And so computed bottom value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,121 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'top' and solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
bottom: 2em;
color: green;
height: 1em;
margin-bottom: 0em;
margin-top: 0em;
position: absolute;
top: 2em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value.
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
gives us:
(solve) : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,113 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are not 'auto' (overconstrained)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'left', 'width' and 'right' are not 'auto' and if the values are overconstrained, then ignore 'left' and then solve for 'left'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: 2em;
margin-left: 0em;
margin-right: 0em;
position: absolute;
right: 2em;
width: 1em;
writing-mode: vertical-lr;
}
/*
"
If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value.
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
160px : left
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right
=====================
320px : width of containing block
gives us:
(solve) : left
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : width
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
160px : right
=====================
320px : width of containing block
And so computed left value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,125 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'top' and solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: 2em;
color: green;
height: 1em;
margin-bottom: 0em;
margin-top: 0em;
position: absolute;
top: 2em;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules.
"
If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value.
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
160px : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
gives us:
(solve) : top
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : height
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
160px : bottom
=====================
320px : height of containing block
And so computed top value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,121 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' and 'right' are 'auto' and 'writing-mode' is 'vertical-lr', then set 'left' to the static position, the width is based on the content and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left properties and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
If all three of 'top', 'height', and 'bottom' are auto, set 'top' to the static position and apply rule number three below.
3. 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'bottom'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,113 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height', and 'bottom' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vrl-004-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are 'auto', then set 'top' to the static position, the height is based on content and then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-3col-2row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: auto;
writing-mode: vertical-lr;
}
/*
"
If all three of 'top', 'height', and 'bottom' are auto, set 'top' to the static position and apply rule number three below.
3. 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'bottom'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(shrink-to-fit) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
gives us:
80px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (shrink-to-fit) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,125 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' and 'right' are 'auto' and 'writing-mode' is 'vertical-lr', then set 'left' to the static position, the width is based on the content and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
If all three of 'top', 'height', and 'bottom' are auto, set 'top' to the static position and apply rule number three below.
3. 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'bottom'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,122 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' and 'right' are 'auto' and 'writing-mode' is 'vertical-lr', then set 'left' to the static position, the width is based on the content and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: auto;
writing-mode: horizontal-tb;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
If all three of 'top', 'height', and 'bottom' are auto, set 'top' to the static position and apply rule number three below.
3. 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'bottom'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,121 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'left', 'width' and 'right' are 'auto' and 'writing-mode' is 'vertical-lr', then set 'left' to the static position, the width is based on the content and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left properties and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
If all three of 'top', 'height', and 'bottom' are auto, set 'top' to the static position and apply rule number three below.
3. 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'bottom'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,113 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height', and 'bottom' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are 'auto', then set 'top' to the static position, the height is based on content and then solve for 'bottom'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: auto;
color: green;
height: auto;
position: absolute;
top: auto;
writing-mode: vertical-lr;
}
/*
"
If all three of 'top', 'height', and 'bottom' are auto, set 'top' to the static position and apply rule number three below.
3. 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'bottom'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
80px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(shrink-to-fit) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
gives us:
80px : top: auto: set to static position
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (shrink-to-fit) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
(solve) : bottom: auto
=====================
320px : height of containing block
And so computed bottom value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,125 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-013-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'left', 'width' and 'right' are 'auto' and 'writing-mode' is 'vertical-lr', then set 'left' to the static position, the width is based on the content and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
If all three of 'top', 'height', and 'bottom' are auto, set 'top' to the static position and apply rule number three below.
3. 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'bottom'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,122 @@
<!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: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-009-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'rtl' and 'left', 'width' and 'right' are 'auto' and 'writing-mode' is 'vertical-lr', then set 'left' to the static position, the width is based on the content and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-2row-320x320.png");
color: transparent;
direction: rtl;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
color: green;
left: auto;
position: absolute;
right: auto;
width: auto;
writing-mode: horizontal-tb;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
If all three of 'top', 'height', and 'bottom' are auto, set 'top' to the static position and apply rule number three below.
3. 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'bottom'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
(based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
gives us:
80px : left: auto: set to static position
+
0px : margin-left
+
0px : border-left-width
+
0px : padding-left
+
80px : (based on the content) : width: auto
+
0px : padding-right
+
0px : border-right-width
+
0px : margin-right
+
(solve) : right: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,119 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto' and 'writing-mode' is 'vertical-lr', then the width is based on the content and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
color: green;
left: 1em;
position: absolute;
right: auto;
width: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
1. 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'top'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
(solve) : right: auto
+
0px : margin-right
+
0px : border-right-width
+
0px : padding-right
+
(based on the content) : width: auto
+
0px : padding-left
+
0px : border-left-width
+
0px : margin-left
+
80px : left
=====================
320px : width of containing block
gives us:
(solve) : right: auto
+
0px : margin-right
+
0px : border-right-width
+
0px : padding-right
+
80px : (based on the content) : width: auto
+
0px : padding-left
+
0px : border-left-width
+
0px : margin-left
+
80px : left
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,111 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vrl-002-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on content and then solve for 'top'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-3col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
bottom: 1em;
color: green;
height: auto;
position: absolute;
top: auto;
writing-mode: vertical-lr;
}
/*
"
1. 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'top'
"
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block
So:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
(based on content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom: auto
=====================
320px : height of containing block
gives us:
(solve) : top: auto
+
0px : margin-top
+
0px : border-top-width
+
0px : padding-top
+
80px : (based on content) : height: auto
+
0px : padding-bottom
+
0px : border-bottom-width
+
0px : margin-bottom
+
80px : bottom: auto
=====================
320px : height of containing block
And so computed top value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,123 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto' and 'writing-mode' is 'vertical-rl', then the width is based on the content and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: red;
color: green;
left: 1em;
position: absolute;
right: auto;
width: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
1. 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'top'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
(solve) : right: auto
+
0px : margin-right
+
0px : border-right-width
+
0px : padding-right
+
(based on the content) : width: auto
+
0px : padding-left
+
0px : border-left-width
+
0px : margin-left
+
80px : left: auto
=====================
320px : width of containing block
gives us:
(solve) : right: auto
+
0px : margin-right
+
0px : border-right-width
+
0px : padding-right
+
80px : (based on the content) : width: auto
+
0px : padding-left
+
0px : border-left-width
+
0px : margin-left
+
80px : left: auto
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,120 @@
<!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: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-003-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto' and 'writing-mode' is 'vertical-rl', then the width is based on the content and then solve for 'right'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
writing-mode: vertical-lr;
}
div#containing-block > span
{
background-color: red;
color: green;
left: 1em;
position: absolute;
right: auto;
width: auto;
writing-mode: horizontal-tb;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
1. 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content per 10.6.7, set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'top'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
(solve) : right: auto
+
0px : margin-right
+
0px : border-right-width
+
0px : padding-right
+
(based on the content) : width: auto
+
0px : padding-left
+
0px : border-left-width
+
0px : margin-left
+
80px : left
=====================
320px : width of containing block
gives us:
(solve) : right: auto
+
0px : margin-right
+
0px : border-right-width
+
0px : padding-right
+
80px : (based on the content) : width: auto
+
0px : padding-left
+
0px : border-left-width
+
0px : margin-left
+
80px : left
=====================
320px : width of containing block
And so computed right value must be 160px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span>X</span></div>
</body>
</html>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше