margin-vrl-002.xht (2143B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/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 in 'vertical-rl' writing-mode context</title> 8 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 10 <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" /> 11 <!-- 12 Test inspired by 13 http://lxr.mozilla.org/mozilla-central/source/layout/reftests/writing-mode/1096224-1b.html 14 --> 15 <link rel="match" href="margin-vrl-002-ref.xht" /> 16 17 <meta content="image" name="flags" /> 18 <meta content="This test checks that margin-left, margin-right, margin-top and margin-bottom do not change in vertical writing-mode. The margin-left property of a box still affects the lefthand margin of such box." name="assert" /> 19 20 <style type="text/css"><![CDATA[ 21 .outer 22 { 23 background-color: blue; 24 border: blue solid 3px; 25 width: 200px; 26 } 27 28 hr 29 { 30 background-color: transparent; 31 border: transparent none 0px; 32 height: 3px; 33 margin: 0.5em auto; 34 } 35 36 .inner 37 { 38 background-color: yellow; 39 height: 50px; 40 width: 50px; 41 } 42 43 .foo 44 { 45 margin-bottom: 5px; 46 margin-left: 100px; 47 margin-right: 50px; 48 margin-top: 20px; 49 writing-mode: vertical-rl; 50 } 51 52 .bar 53 { 54 margin-bottom: 20px; 55 margin-left: 50px; 56 margin-right: 100px; 57 margin-top: 5px; 58 writing-mode: vertical-rl; 59 } 60 61 div#reference 62 { 63 margin-top: 1em; 64 } 65 ]]></style> 66 </head> 67 68 <body> 69 70 <p>Test passes if there are 2 <strong>identical</strong> blue rectangles, each with 2 small yellow squares: the layout must be identical.</p> 71 72 <div class="outer"> 73 <div class="inner foo"></div> 74 <hr /> 75 <div class="inner bar"></div> 76 </div> 77 78 <div id="reference"><img src="support/blue-yellow-206w-165h.png" width="206" height="165" alt="Image download support must be enabled" /></div> 79 80 </body> 81 </html>