flexbox-mbp-horiz-002v.xhtml (2540B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <!-- Testcase with margin/border/padding on flex items 7 and with various writing-modes on the items. --> 8 <html xmlns="http://www.w3.org/1999/xhtml"> 9 <head> 10 <title> 11 CSS Test: Testing margins, borders, and padding on flex items in a horizontal flex container 12 (with a vertical writing-mode on the flex items). 13 </title> 14 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 15 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#layout-algorithm"/> 16 <link rel="match" href="flexbox-mbp-horiz-002-ref.xhtml"/> 17 <style> 18 div { height: 100px; border: 0; } 19 div.flexbox { 20 width: 200px; 21 font-size: 10px; 22 display: flex; 23 } 24 div.a { 25 flex: 1 0 9px; 26 background: lightgreen; 27 margin-left: 1px; 28 margin-right: 3px; 29 border-style: dotted; 30 border-left-width: 2px; 31 border-right-width: 4px; 32 padding-left: 5px; 33 padding-right: 6px; 34 writing-mode: vertical-lr; 35 } 36 div.b { 37 flex: 2 0 1px; 38 background: yellow; 39 margin-left: 2px; 40 margin-right: 4px; 41 border-style: dashed; 42 border-left-width: 7px; 43 border-right-width: 3px; 44 padding-left: 1px; 45 padding-right: 2px; 46 writing-mode: vertical-rl; 47 } 48 div.c { 49 flex: 3 0 40px; 50 background: orange; 51 writing-mode: sideways-lr; 52 } 53 div.flexNone { 54 flex: none; 55 background: pink; 56 writing-mode: vertical-lr; 57 } 58 div.flexBasis { 59 flex: 0 0 20px; 60 background: gray; 61 writing-mode: sideways-rl; 62 } 63 div.spacer { 64 width: 15px; 65 height: 15px; 66 background: purple; 67 } 68 </style> 69 </head> 70 <body> 71 <div class="flexbox"><div class="a"></div><div class="b"/></div> 72 <div class="flexbox"><div class="a"/><div class="c"/></div> 73 <div class="flexbox"><div class="a"/> 74 <div class="flexNone"><div class="spacer"/></div> 75 </div> 76 <div class="flexbox"><div class="b"/><div class="c"/></div> 77 <div class="flexbox"><div class="b"/> 78 <div class="flexNone"><div class="spacer"/><div class="spacer"/></div> 79 </div> 80 81 <div class="flexbox"> 82 <div class="a"/><div class="b"/><div class="flexBasis"/><div class="c"/> 83 </div> 84 </body> 85 </html>