tor-browser

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

flexbox-multi-column-vertical-lr-2.html (3363B)


      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 column 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-column-vertical-lr-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 column flex container, with various combinations of margin/border/padding, alignments, and row-gap. The block-size of the flex container is made shorter than its flex items.">
     12 
     13  <style>
     14  html {
     15    writing-mode: vertical-lr;
     16  }
     17  .multicol {
     18    block-size: 50px;
     19    inline-size: 190px;
     20    column-width: 90px;
     21    column-fill: auto;
     22    column-gap: 10px;
     23    border: 5px solid orange;
     24    margin-block-end: 5px; /* Just to separate each sub-testcase visually. */
     25  }
     26  .flexContainer {
     27    display: flex;
     28    flex-wrap: wrap;
     29    flex-direction: column;
     30    background: gray;
     31    /* border-width is 0 by default; some sub-testcases will increase it. */
     32    border: 0 solid lightgray;
     33    /* Block-size is deliberately made so that the flex items are wrapping into
     34       three lines, and each line is 30px wide. */
     35    block-size: 60px;
     36  }
     37  .border-padding {
     38    border-block-width: 10px;
     39    padding-block: 5px;
     40  }
     41 
     42  /* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
     43  header, nav, article, footer {
     44    inline-size: 20px;
     45  }
     46  header {
     47    background: cyan;
     48    block-size: 50px;
     49  }
     50  nav {
     51    background: magenta;
     52    block-size: 25px;
     53    align-self: flex-start;
     54  }
     55  article {
     56    background: yellow;
     57    block-size: 25px;
     58    align-self: center;
     59  }
     60  footer {
     61    background: black;
     62    block-size: 50px;
     63    align-self: flex-end;
     64  }
     65  </style>
     66 
     67  <body>
     68    <!-- Basic one without any margin/border/padding. -->
     69    <div class="multicol">
     70      <div class="flexContainer">
     71        <header></header><nav></nav><article></article><footer></footer>
     72      </div>
     73    </div>
     74 
     75    <!-- Test a container with margin-block-start. -->
     76    <div class="multicol">
     77      <div class="flexContainer" style="margin-block-start: 25px">
     78        <header></header><nav></nav><article></article><footer></footer>
     79      </div>
     80    </div>
     81 
     82    <!-- Test a container not at the top of the column/page. -->
     83    <div class="multicol">
     84      <div style="block-size: 25px"></div>
     85      <div class="flexContainer">
     86        <header></header><nav></nav><article></article><footer></footer>
     87      </div>
     88    </div>
     89 
     90    <!-- Test a container with border and padding. -->
     91    <div class="multicol">
     92      <div class="flexContainer border-padding">
     93        <header></header><nav></nav><article></article><footer></footer>
     94      </div>
     95    </div>
     96 
     97    <!-- Test a container with border, padding, and row-gap. -->
     98    <div class="multicol">
     99      <div class="flexContainer border-padding" style="row-gap: 5px">
    100        <header></header><nav></nav><article></article><footer></footer>
    101      </div>
    102    </div>
    103  </body>
    104 </html>