tor-browser

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

contain-layout-baseline-003.html (1093B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Containment Test: Layout containment supress baseline in grid items</title>
      4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
      6 <link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-baselines">
      7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht">
      8 <meta name=assert content="Grid items with layout containment are treated as having no baseline, for that reason their baseline is synthesized from the grid item's border box when they're baseline aligned.">
      9 <style>
     10 #grid {
     11  display: inline-grid;
     12  align-items: baseline;
     13  background: red;
     14  grid-auto-flow: column;
     15 }
     16 
     17 canvas {
     18  background: green;
     19  width: 50px;
     20  height: 100px;
     21 }
     22 
     23 #item {
     24  contain: layout;
     25  color: transparent;
     26  background: green;
     27  width: 50px;
     28  height: 100px;
     29 }
     30 </style>
     31 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     32 <div id="grid">
     33  <canvas></canvas>
     34  <div id="item">item</div>
     35 </div>