tor-browser

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

flexbox-align-self-vert-004.xhtml (2408B)


      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 for align-items / align-self behavior, with all the possible
      7     values included on different items within a flex container, and with the
      8     flex container being skinnier than its items. -->
      9 <html xmlns="http://www.w3.org/1999/xhtml">
     10  <head>
     11    <title>CSS Test: Testing the behavior of 'align-self' with a vertical flex container that's skinnier than its items, with margin/padding/border on the items</title>
     12    <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
     13    <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-items-property"/>
     14    <link rel="match" href="flexbox-align-self-vert-004-ref.xhtml"/>
     15    <meta name="fuzzy" content="maxDifference=0-58;totalPixels=0-33"/>
     16    <style>
     17      .flexbox {
     18        border: 1px dashed blue;
     19        width: 4px;
     20        display: flex;
     21        flex-direction: column;
     22        float: left;
     23        font-family: sans-serif;
     24        font-size: 10px;
     25        margin-left: 80px;
     26      }
     27 
     28      .flexbox > div {
     29        margin:       1px 2px 3px 4px;
     30        border-width: 2px 3px 4px 5px;
     31        padding:      3px 4px 5px 6px;
     32 
     33        border-style: dotted;
     34      }
     35 
     36      div.big {
     37        font-size: 18px;
     38        width: 50px;
     39      }
     40 
     41      /* Classes for each of the various align-self values */
     42      .flex-start {
     43        background: lime;
     44        align-self: flex-start;
     45      }
     46      .flex-end {
     47        background: orange;
     48        align-self: flex-end;
     49      }
     50      .center {
     51        background: lightblue;
     52        align-self: center;
     53      }
     54      .baseline {
     55        background: teal;
     56        align-self: baseline;
     57      }
     58      .stretch {
     59        background: pink;
     60        align-self: stretch;
     61      }
     62   </style>
     63  </head>
     64  <body>
     65    <div class="flexbox">
     66      <div class="flex-start">start</div>
     67      <div class="flex-start big">a b</div>
     68      <div class="flex-end">end</div>
     69      <div class="flex-end big">a b</div>
     70      <div class="center">center</div>
     71      <div class="center big">a b</div>
     72    </div>
     73    <div class="flexbox">
     74      <div class="baseline">base</div>
     75      <div class="baseline big">abc</div>
     76      <div class="stretch">stretch</div>
     77      <div class="stretch big">a b</div>
     78    </div>
     79  </body>
     80 </html>