| 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: Clearance calculations - clearing box has large
r margin than width of float</title> |
| 8 |
| 9 <!-- |
| 10 This test is the verticalized version of |
| 11 http://test.csswg.org/suites/css2.1/latest/html4/clear-clearance-calculation-0
03.htm |
| 12 --> |
| 13 |
| 14 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserB
ugsSection/css21testsuite/" /> |
| 15 <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layo
ut" title="7.1 Principles of Layout in Vertical Writing Modes" /> |
| 16 <link rel="match" href="clearance-calculations-vrl-006-ref.xht" /> |
| 17 |
| 18 <meta content="ahem image" name="flags" /> |
| 19 <meta content="This test checks that when a clearing element (in a block forma
ting context with 'writing-mode' set to 'vertical-rl') has a right margin larger
than the width of a floated element, then the right margin is collapsed with th
e margin-left of preceding in-flow sibling. The clearing element is then placed
at the point of the resulting collapsed margin." name="assert" /> |
| 20 |
| 21 <style type="text/css"><![CDATA[ |
| 22 div |
| 23 { |
| 24 height: 5em; /* computes to 100px */ |
| 25 } |
| 26 |
| 27 div#parent |
| 28 { |
| 29 background: red url("support/clearance-calculation-vrl-006.png"); |
| 30 font: 1.25em/1 Ahem; /* computes to 20px/20px */ |
| 31 min-width: 7em; |
| 32 -webkit-writing-mode: vertical-rl; |
| 33 } |
| 34 |
| 35 div > div |
| 36 { |
| 37 background-color: green; |
| 38 width: 1em; |
| 39 } |
| 40 |
| 41 div#preceding-sibling |
| 42 { |
| 43 margin-left: 1em; |
| 44 } |
| 45 |
| 46 div#floated-left |
| 47 { |
| 48 float: left; |
| 49 } |
| 50 |
| 51 div#clearing-left /* collapsing-through element */ |
| 52 { |
| 53 clear: left; |
| 54 margin-left: 4em; |
| 55 margin-right: 5em; |
| 56 width: 0em; |
| 57 } |
| 58 ]]></style> |
| 59 |
| 60 </head> |
| 61 |
| 62 <body> |
| 63 |
| 64 <p>Test passes if there is <strong>no red</strong>.</p> |
| 65 |
| 66 <div id="parent"> |
| 67 <div id="preceding-sibling"></div> |
| 68 <div id="floated-left"></div> |
| 69 <div id="clearing-left"></div> |
| 70 <div id="following-sibling"></div> |
| 71 </div> |
| 72 |
| 73 </body> |
| 74 </html> |
| OLD | NEW |