tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

flexbox-mbp-horiz-002b.xhtml (2476B)


      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. (NOTE: This renders
      7     the same as the "-2a" variant, which lacks padding, because we've
      8     just replaced some of the "-2a" variant's content-box area with
      9     padding-box area in this test.) -->
     10 <html xmlns="http://www.w3.org/1999/xhtml">
     11  <head>
     12    <title>CSS Test: Testing margins, borders, and padding on flex items in a horizontal flex container</title>
     13    <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
     14    <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#layout-algorithm"/>
     15    <link rel="match" href="flexbox-mbp-horiz-002-ref.xhtml"/>
     16    <style>
     17      div { height: 100px; border: 0; }
     18      div.flexbox {
     19        width: 200px;
     20        font-size: 10px;
     21        display: flex;
     22      }
     23      div.a {
     24        flex: 1 0 9px;
     25        background: lightgreen;
     26        margin-left: 1px;
     27        margin-right: 3px;
     28        border-style: dotted;
     29        border-left-width: 2px;
     30        border-right-width: 4px;
     31        padding-left: 5px;
     32        padding-right: 6px;
     33      }
     34      div.b {
     35        flex: 2 0 1px;
     36        background: yellow;
     37        margin-left: 2px;
     38        margin-right: 4px;
     39        border-style: dashed;
     40        border-left-width: 7px;
     41        border-right-width: 3px;
     42        padding-left: 1px;
     43        padding-right: 2px;
     44      }
     45      div.c {
     46        flex: 3 0 40px;
     47        background: orange;
     48      }
     49      div.flexNone {
     50        flex: none;
     51        background: pink;
     52      }
     53      div.flexBasis {
     54        flex: 0 0 20px;
     55        background: gray;
     56      }
     57      div.spacer {
     58        display: inline-block;
     59        width: 15px;
     60        height: 15px;
     61        background: purple;
     62      }
     63    </style>
     64  </head>
     65  <body>
     66    <div class="flexbox"><div class="a"></div><div class="b"/></div>
     67    <div class="flexbox"><div class="a"/><div class="c"/></div>
     68    <div class="flexbox"><div class="a"/>
     69      <div class="flexNone"><div class="spacer"/></div>
     70    </div>
     71    <div class="flexbox"><div class="b"/><div class="c"/></div>
     72    <div class="flexbox"><div class="b"/>
     73      <div class="flexNone"><div class="spacer"/><div class="spacer"/></div>
     74    </div>
     75 
     76    <div class="flexbox">
     77      <div class="a"/><div class="b"/><div class="flexBasis"/><div class="c"/>
     78    </div>
     79  </body>
     80 </html>