tor-browser

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

flexbox-single-column-1c.html (3101B)


      1 <!DOCTYPE html>
      2 <!-- Any copyright is dedicated to the Public Domain.
      3     http://creativecommons.org/publicdomain/zero/1.0/ -->
      4 <html>
      5  <meta charset="utf-8">
      6  <title>CSS Flexbox Test: Fragmentation of fixed block-size single-line column flex container with flexible length flex items</title>
      7  <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
      8  <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
      9  <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
     10  <link rel="match" href="flexbox-single-column-1-ref.html">
     11  <meta name="assert" content="This test verifies fragmentation of flexible length flex items in a fixed block-size single-line column flex container, with various combinations of margin/border/padding, alignments, and row-gap.">
     12 
     13  <style>
     14  .multicol {
     15    block-size: 50px;
     16    inline-size: 190px;
     17    column-width: 40px;
     18    column-fill: auto;
     19    column-gap: 10px;
     20    border: 5px solid orange;
     21    margin-block-end: 5px; /* Just to separate each sub-testcase visually. */
     22  }
     23  .flexContainer {
     24    display: flex;
     25    flex-wrap: nowrap;
     26    flex-direction: column;
     27    background: gray;
     28    /* border-width is 0 by default; some sub-testcases will increase it. */
     29    border: 0 solid lightgray;
     30    block-size: 150px;
     31  }
     32  .border-padding {
     33    border-block-width: 10px;
     34    padding-block: 5px;
     35  }
     36 
     37  /* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
     38  header {
     39    background: cyan;
     40    flex-grow: 2;
     41  }
     42  nav, article, footer {
     43    inline-size: 30px;
     44  }
     45  nav {
     46    background: magenta;
     47    flex-grow: 1;
     48    align-self: flex-start;
     49  }
     50  article {
     51    background: yellow;
     52    flex-grow: 1;
     53    align-self: center;
     54  }
     55  footer {
     56    background: black;
     57    flex-grow: 2;
     58    align-self: flex-end;
     59  }
     60  </style>
     61 
     62  <body>
     63    <!-- Basic one without any margin/border/padding. -->
     64    <div class="multicol">
     65      <div class="flexContainer">
     66        <header></header><nav></nav><article></article><footer></footer>
     67      </div>
     68    </div>
     69 
     70    <!-- Test a container with margin-block-start. -->
     71    <div class="multicol">
     72      <div class="flexContainer" style="margin-block-start: 25px">
     73        <header></header><nav></nav><article></article><footer></footer>
     74      </div>
     75    </div>
     76 
     77    <!-- Test a container not at the top of the column/page. -->
     78    <div class="multicol">
     79      <div style="block-size: 25px"></div>
     80      <div class="flexContainer">
     81        <header></header><nav></nav><article></article><footer></footer>
     82      </div>
     83    </div>
     84 
     85    <!-- Test a container with border and padding. -->
     86    <div class="multicol">
     87      <div class="flexContainer border-padding">
     88        <header></header><nav></nav><article></article><footer></footer>
     89      </div>
     90    </div>
     91 
     92    <!-- Test a container with border, padding, and row-gap. -->
     93    <div class="multicol">
     94      <div class="flexContainer border-padding" style="block-size: 165px; row-gap: 5px">
     95        <header></header><nav></nav><article></article><footer></footer>
     96      </div>
     97    </div>
     98  </body>
     99 </html>