| 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: 'vertical-rl' and margin collapsing - right mar
gin of a block collapses with right margin of its first child</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/#logical-direc
tion-layout" title="7.4 Flow-Relative Mappings" /> |
| 11 <link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht"
/> |
| 12 |
| 13 <!-- |
| 14 Test adapted from |
| 15 http://test.csswg.org/suites/css2.1/nightly-unstable/html4/margin-collapse-017
.htm |
| 16 |
| 17 " |
| 18 The margin collapsing rules apply exactly with the block-start margin substitu
ted for the top margin and the block-end margin substituted for the bottom margi
n. |
| 19 " |
| 20 --> |
| 21 |
| 22 <meta content="ahem image" name="flags" /> |
| 23 <meta name="assert" content="This test checks that, in a vertical-rl context,
the right margin an in-flow block box collapses with its first in-flow block-lev
el child's right margin if the element has no top border, no top padding, and th
e child has no clearance." /> |
| 24 |
| 25 <style type="text/css"><![CDATA[ |
| 26 div |
| 27 { |
| 28 font: 25px/1em Ahem; |
| 29 height: 4em; |
| 30 } |
| 31 |
| 32 div#wrapper |
| 33 { |
| 34 background: red url("support/margin-collapse-2em-space-wm-vert.png"); |
| 35 border-right: green solid 1em; |
| 36 width: 3em; |
| 37 -webkit-writing-mode: vertical-rl; |
| 38 } |
| 39 |
| 40 div#parent |
| 41 { |
| 42 margin-right: 2em; /* block-start margin */ |
| 43 } |
| 44 |
| 45 div#first-child |
| 46 { |
| 47 background-color: green; |
| 48 margin-right: 2em; /* block-start margin of child */ |
| 49 width: 1em; |
| 50 } |
| 51 ]]></style> |
| 52 |
| 53 </head> |
| 54 |
| 55 <body> |
| 56 |
| 57 <p>Test passes if there is a filled green square and <strong>no red</strong>.<
/p> |
| 58 |
| 59 <div id="wrapper"> |
| 60 <div id="parent"> |
| 61 <div id="first-child"></div> |
| 62 </div> |
| 63 </div> |
| 64 |
| 65 </body> |
| 66 </html> |
| OLD | NEW |