tor-browser

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

flexbox-multi-row-2a.html (3231B)


      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 multi-line row flex container with fixed block-size 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-multi-row-2-ref.html">
     11  <meta name="assert" content="This test verifies fragmentation of fixed block-size flex items in a fixed block-size multi-line row flex container, with various combinations of margin/border/padding, alignments, and gap.">
     12 
     13  <style>
     14  .multicol {
     15    block-size: 70px;
     16    inline-size: 200px;
     17    column-width: 60px;
     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: wrap;
     26    flex-direction: row;
     27    background: gray;
     28    /* border-width is 0 by default; some sub-testcases will increase it. */
     29    border: 0 solid lightgray;
     30    block-size: 140px;
     31  }
     32  .border-padding {
     33    border-block-width: 10px;
     34    padding-block: 5px;
     35  }
     36  .with-gap {
     37    row-gap: 20px;
     38    column-gap: 10px;
     39  }
     40 
     41  header, nav, article, footer {
     42    inline-size: 30px;
     43  }
     44  .with-gap header, .with-gap nav, .with-gap article, .with-gap footer {
     45    inline-size: 25px;
     46  }
     47 
     48  /* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
     49  header {
     50    background: cyan;
     51    block-size: 50px;
     52  }
     53  nav {
     54    background: magenta;
     55    block-size: 25px;
     56    align-self: flex-start;
     57  }
     58  article {
     59    background: yellow;
     60    block-size: 40px;
     61    align-self: center;
     62  }
     63  footer {
     64    background: black;
     65    block-size: 50px;
     66    align-self: flex-end;
     67  }
     68  </style>
     69 
     70  <body>
     71    <!-- Basic one without any margin/border/padding. -->
     72    <div class="multicol">
     73      <div class="flexContainer">
     74        <header></header><nav></nav><article></article><footer></footer>
     75      </div>
     76    </div>
     77 
     78    <!-- Test a container with margin-block-start. -->
     79    <div class="multicol">
     80      <div class="flexContainer" style="margin-block-start: 25px">
     81        <header></header><nav></nav><article></article><footer></footer>
     82      </div>
     83    </div>
     84 
     85    <!-- Test a container not at the top of the column/page. -->
     86    <div class="multicol">
     87      <div style="block-size: 25px"></div>
     88      <div class="flexContainer">
     89        <header></header><nav></nav><article></article><footer></footer>
     90      </div>
     91    </div>
     92 
     93    <!-- Test a container with border and padding. -->
     94    <div class="multicol">
     95      <div class="flexContainer border-padding">
     96        <header></header><nav></nav><article></article><footer></footer>
     97      </div>
     98    </div>
     99 
    100    <!-- Test a container with border, padding, and gap. -->
    101    <div class="multicol">
    102      <div class="flexContainer border-padding with-gap">
    103        <header></header><nav></nav><article></article><footer></footer>
    104      </div>
    105    </div>
    106  </body>
    107 </html>