| OLD | NEW |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
| 2 | 2 |
| 3 <html xmlns="http://www.w3.org/1999/xhtml"> | 3 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | 4 |
| 5 <head> | 5 <head> |
| 6 | 6 |
| 7 <title>CSS Writing Modes Test: padding percentage and 'vertical-rl'</title> | 7 <title>CSS Writing Modes Test: padding percentage and vertical-rl (orthogonal
flow)</title> |
| 8 | 8 |
| 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserB
ugsSection/css21testsuite/" /> | 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserB
ugsSection/css21testsuite/" /> |
| 10 <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-map
ping" title="7.2 Dimensional Mapping" /> | 10 <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-map
ping" title="7.2 Dimensional Mapping" /> |
| 11 <link rel="match" href="margin-vrl-002-ref.xht" /> | 11 <link rel="match" href="margin-vrl-002-ref.xht" /> |
| 12 | 12 |
| 13 <meta content="image" name="flags" /> | 13 <meta content="image" name="flags" /> |
| 14 <meta content="This test checks that percentages on the padding are calculated
with respect to the width of the containing block if the 'writing-mode' of such
containing block is 'horizontal-tb'. In this test, div.outer's computed 'writin
g-mode' value is 'horizontal-tb' and it is the div.inner's containing block." na
me="assert" /> | 14 <meta content="This test checks that percentages on the padding are calculated
with respect to the width (inline-size) of the containing block if the 'writing
-mode' of such containing block is 'horizontal-tb'. In this test, div.outer's co
mputed 'writing-mode' value is 'horizontal-tb' and it is the div.inner's contain
ing block." name="assert" /> |
| 15 | 15 |
| 16 <style type="text/css"><![CDATA[ | 16 <style type="text/css"><![CDATA[ |
| 17 div.outer | 17 div.outer |
| 18 { | 18 { |
| 19 background-color: blue; | 19 background-color: blue; |
| 20 border: blue solid 3px; | 20 border: blue solid 3px; |
| 21 width: 200px; | 21 width: 200px; |
| 22 } | 22 } |
| 23 | 23 |
| 24 hr | |
| 25 { | |
| 26 background-color: transparent; | |
| 27 border: transparent none 0px; | |
| 28 height: 3px; | |
| 29 margin: 3px auto; | |
| 30 } | |
| 31 | |
| 32 div.inner | 24 div.inner |
| 33 { | 25 { |
| 34 background-color: transparent; | 26 background-color: transparent; |
| 35 height: 50px; /* necessary, otherwise div.inner blocks must grow as tall a
s the height of viewport */ | 27 height: 50px; |
| 36 } | 28 -webkit-writing-mode: vertical-rl; |
| 37 | |
| 38 img | |
| 39 { | |
| 40 vertical-align: bottom; | |
| 41 /* | |
| 42 Not necessary but because Chrome 40 does not centrally baseline-align | |
| 43 inline replaced element in vertical writing-mode with 'text-orientation: m
ixed' | |
| 44 or with 'text-orientation: upright', we do this to avoid a false negative. | |
| 45 */ | |
| 46 } | 29 } |
| 47 | 30 |
| 48 div.foo | 31 div.foo |
| 49 { | 32 { |
| 50 padding-bottom: 2.5%; /* 5px */ | 33 padding-bottom: 2.5%; /* 5px */ |
| 51 padding-left: 50%; /* 100px */ | 34 padding-left: 50%; /* 100px */ |
| 52 padding-right: 25%; /* 50px */ | 35 padding-right: 25%; /* 50px */ |
| 53 padding-top: 10%; /* 20px */ | 36 padding-top: 10%; /* 20px */ |
| 54 -webkit-writing-mode: vertical-rl; | 37 } |
| 38 |
| 39 hr |
| 40 { |
| 41 background-color: transparent; |
| 42 border: transparent none 0px; |
| 43 height: 3px; |
| 44 margin: 3px auto; |
| 55 } | 45 } |
| 56 | 46 |
| 57 div.bar | 47 div.bar |
| 58 { | 48 { |
| 59 padding-bottom: 10%; | 49 padding-bottom: 10%; |
| 60 padding-left: 25%; | 50 padding-left: 25%; |
| 61 padding-right: 50%; | 51 padding-right: 50%; |
| 62 padding-top: 2.5%; | 52 padding-top: 2.5%; |
| 63 -webkit-writing-mode: vertical-rl; | |
| 64 } | 53 } |
| 65 | 54 |
| 66 div#reference | 55 div#reference |
| 67 { | 56 { |
| 68 margin-top: 1em; | 57 margin-top: 1em; |
| 69 } | 58 } |
| 70 ]]></style> | 59 ]]></style> |
| 71 </head> | 60 </head> |
| 72 | 61 |
| 73 <body> | 62 <body> |
| 74 | 63 |
| 75 <p>Test passes if there are 2 <strong>identical</strong> blue rectangles, each
with 2 small yellow squares: the layout must be identical.</p> | 64 <p>Test passes if there are 2 <strong>identical</strong> blue rectangles, each
with 2 small yellow squares: the layout must be identical.</p> |
| 76 | 65 |
| 77 <div class="outer"> | 66 <div class="outer"> |
| 78 <div class="inner foo"><img src="support/swatch-yellow.png" width="50" heigh
t="50" alt="Image download support must be enabled" /></div> | 67 <div class="inner foo"><img src="support/swatch-yellow.png" width="50" heigh
t="50" alt="Image download support must be enabled" /></div> |
| 79 <hr /> | 68 <hr /> |
| 80 <div class="inner bar"><img src="support/swatch-yellow.png" width="50" heigh
t="50" alt="Image download support must be enabled" /></div> | 69 <div class="inner bar"><img src="support/swatch-yellow.png" width="50" heigh
t="50" alt="Image download support must be enabled" /></div> |
| 81 </div> | 70 </div> |
| 82 | 71 |
| 83 <div id="reference"><img src="support/blue-yellow-206w-165h.png" width="206" h
eight="165" alt="Image download support must be enabled" /></div> | 72 <div id="reference"><img src="support/blue-yellow-206w-165h.png" width="206" h
eight="165" alt="Image download support must be enabled" /></div> |
| 84 | 73 |
| 85 </body> | 74 </body> |
| 86 </html> | 75 </html> |
| OLD | NEW |