| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
| 2 |
| 3 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 |
| 5 <head> |
| 6 |
| 7 <title>CSS Writing Modes Test: padding percentage and 'vertical-rl'</title> |
| 8 |
| 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" /> |
| 11 <link rel="match" href="margin-vrl-002-ref.xht" /> |
| 12 |
| 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" /> |
| 15 |
| 16 <style type="text/css"><![CDATA[ |
| 17 div.outer |
| 18 { |
| 19 background-color: blue; |
| 20 border: blue solid 3px; |
| 21 width: 200px; |
| 22 } |
| 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 |
| 33 { |
| 34 background-color: transparent; |
| 35 height: 50px; /* necessary, otherwise div.inner blocks must grow as tall a
s the height of viewport */ |
| 36 } |
| 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 } |
| 47 |
| 48 div.foo |
| 49 { |
| 50 padding-bottom: 2.5%; /* 5px */ |
| 51 padding-left: 50%; /* 100px */ |
| 52 padding-right: 25%; /* 50px */ |
| 53 padding-top: 10%; /* 20px */ |
| 54 -webkit-writing-mode: vertical-rl; |
| 55 } |
| 56 |
| 57 div.bar |
| 58 { |
| 59 padding-bottom: 10%; |
| 60 padding-left: 25%; |
| 61 padding-right: 50%; |
| 62 padding-top: 2.5%; |
| 63 -webkit-writing-mode: vertical-rl; |
| 64 } |
| 65 |
| 66 div#reference |
| 67 { |
| 68 margin-top: 1em; |
| 69 } |
| 70 ]]></style> |
| 71 </head> |
| 72 |
| 73 <body> |
| 74 |
| 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> |
| 76 |
| 77 <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> |
| 79 <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> |
| 81 </div> |
| 82 |
| 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> |
| 84 |
| 85 </body> |
| 86 </html> |
| OLD | NEW |