| 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: margin percentage and 'vertical-lr'</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 margin 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 'writing
-mode' value is 'horizontal-tb' and it is the div.inner's containing block." nam
e="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: 0.5em auto; |
| 30 } |
| 31 |
| 32 div.inner |
| 33 { |
| 34 background-color: yellow; |
| 35 height: 50px; /* necessary, otherwise div.inner blocks must grow as tall a
s the height of viewport */ |
| 36 width: 50px; |
| 37 } |
| 38 |
| 39 div.foo |
| 40 { |
| 41 margin-bottom: 2.5%; |
| 42 margin-left: 50%; |
| 43 margin-right: 25%; |
| 44 margin-top: 10%; |
| 45 -webkit-writing-mode: vertical-lr; |
| 46 } |
| 47 |
| 48 div.bar |
| 49 { |
| 50 margin-bottom: 10%; |
| 51 margin-left: 25%; |
| 52 margin-right: 50%; |
| 53 margin-top: 2.5%; |
| 54 -webkit-writing-mode: vertical-lr; |
| 55 } |
| 56 |
| 57 div#reference |
| 58 { |
| 59 margin-top: 1em; |
| 60 } |
| 61 ]]></style> |
| 62 </head> |
| 63 |
| 64 <body> |
| 65 |
| 66 <p>Test passes if there are 2 <strong>identical</strong> blue rectangles, each
with 2 small yellow squares: the layout must be identical.</p> |
| 67 |
| 68 <div class="outer"> |
| 69 <div class="inner foo"></div> |
| 70 <hr /> |
| 71 <div class="inner bar"></div> |
| 72 </div> |
| 73 |
| 74 <div id="reference"><img src="support/blue-yellow-206w-165h.png" width="206" h
eight="165" alt="Image download support must be enabled" /></div> |
| 75 |
| 76 </body> |
| 77 </html> |
| OLD | NEW |