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-007.html (1837B)


      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="A single-line column flexbox shouldn't shrink-to-fit since its flex item is stretching in the main-axis, honoring the 'align-self: normal (behaves as 'stretch')'. The grid item's relative block size will be resolved againts the grid's row size, while its inline-size should be stretched as well, honoring its justify-self: 'normal' (behaves as 'stretch')">
     14 <style>
     15    body { overflow: hidden; }
     16    .flexbox {
     17        display: flex;
     18        flex-flow: column nowrap;
     19        align-content: flex-start;
     20        width: 100px;
     21        height: 100px;
     22        background: red;
     23    }
     24    .grid {
     25        display: grid;
     26        align-items: baseline;
     27        grid-template-rows: 100px;
     28    }
     29    .gridItem {
     30        background: green;
     31        height: 100%;
     32    }
     33 </style>
     34 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     35 <div class="flexbox">
     36    <div class="grid">
     37        <div class="gridItem"></div>
     38    </div>
     39 </div>