tor-browser

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

self-align-start-end-flex-001.html (2936B)


      1 <!DOCTYPE html>
      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. -->
      8 <html>
      9  <head>
     10    <title>CSS Test: Testing the behavior of 'align-self' 'start' and 'end' property values on flex items that are blocks, in a horizontal flex container</title>
     11    <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
     12    <link rel="author" title="Martin Robinson" href="mailto:mrobinson@igalia.com"/>
     13    <link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"/>
     14    <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-items-property"/>
     15    <link rel="match" href="self-align-start-end-flex-001-ref.html"/>
     16    <style>
     17      .flexbox {
     18        border: 1px dashed blue;
     19        height: 200px;
     20        width: 320px;
     21        display: flex;
     22        font-size: 10px;
     23        line-height: 10px;
     24 
     25        /* Any children whose align-self is 'auto' (or unspecified, or
     26           initial) will end up taking this value from us: */
     27        align-items: center;
     28 
     29        /* Any children whose align-self is 'inherit' will end up
     30           inheriting this value from us: */
     31        align-self: flex-end;
     32 
     33        /* Ensure that this test works, no matter if the flexbox
     34           container is considered multi-line or not. */
     35        align-content: stretch;
     36      }
     37 
     38      .wrap-reverse {
     39          flex-wrap: wrap-reverse;
     40      }
     41 
     42      .flexbox > div {
     43        width: 40px;
     44      }
     45 
     46      .big {
     47        height: 100px;
     48        font-size: 20px;
     49        line-height: 20px;
     50      }
     51 
     52      /* Classes for each of the various align-self values */
     53      .flex-start {
     54        background: lime;
     55        align-self: flex-start;
     56      }
     57      .flex-end {
     58        background: orange;
     59        align-self: flex-end;
     60      }
     61      .start {
     62        background: lightblue;
     63        align-self: start;
     64      }
     65      .end {
     66        background: teal;
     67        align-self: end;
     68      }
     69    </style>
     70  </head>
     71  <body>
     72    <div class="flexbox">
     73      <div class="flex-start">start</div>
     74      <div class="flex-start big">a b c d e f</div>
     75      <div class="flex-end">end</div>
     76      <div class="flex-end big">a b c d e f</div>
     77      <div class="start">start</div>
     78      <div class="start big">a b c d e f</div>
     79      <div class="end">end</div>
     80      <div class="end big">a b c d e f</div>
     81    </div>
     82    <div class="flexbox wrap-reverse">
     83      <div class="flex-start">start</div>
     84      <div class="flex-start big">a b c d e f</div>
     85      <div class="flex-end">end</div>
     86      <div class="flex-end big">a b c d e f</div>
     87      <div class="start">start</div>
     88      <div class="start big">a b c d e f</div>
     89      <div class="end">end</div>
     90      <div class="end big">a b c d e f</div>
     91    </div>
     92  </body>
     93 </html>