tor-browser

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

grid-as-flex-item-should-not-shrink-to-fit-004.html (1748B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Grid Layout Test: Evaluate the behavior of a grid container as Flexbox item</title>
      4 <link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-grid/#layout-algorithm">
      6 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-lines">
      7 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#propdef-flex-wrap">
      8 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#propdef-align-content">
      9 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#propdef-align-self">
     10 <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-flex">
     11 <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-grid">
     12 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
     13 <meta name="assert" content="The align-content: 'stretch' prevents the multi-line column flexbox to shrink-to-fit (default behavior), hence the grid container will be stretched, honoring its align-self: 'normal (behaves as 'stretch'), as well as its vertical grid item, honoring its justify-self: 'normal' (behaves as 'stretch') ">
     14 <style>
     15    body { overflow: hidden; }
     16    .flexbox {
     17        display: flex;
     18        flex-flow: column wrap;
     19        align-content: stretch;
     20        width: 100px;
     21        height: 100px;
     22        background: red;
     23    }
     24    .grid {
     25        display: grid;
     26    }
     27    .gridItem {
     28        background: green;
     29        height: 100px;
     30        writing-mode: vertical-lr;
     31    }
     32 </style>
     33 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     34 <div class="flexbox">
     35    <div class="grid">
     36        <div class="gridItem"></div>
     37    </div>
     38 </div>