tor-browser

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

flexbox-single-row-1d.html (3442B)


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