tor-browser

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

contain-layout-baseline-002.html (1083B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Containment Test: Layout containment supress baseline in flex 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-flexbox-1/#valdef-align-items-baseline">
      7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht">
      8 <meta name=assert content="Flex items with layout containment are treated as having no baseline, for that reason their baseline is synthesized from the flex item's border box when they're baseline aligned.">
      9 <style>
     10 #flex {
     11  display: inline-flex;
     12  align-items: baseline;
     13  background: red;
     14 }
     15 
     16 canvas {
     17  background: green;
     18  width: 50px;
     19  height: 100px;
     20 }
     21 
     22 #item {
     23  contain: layout;
     24  color: transparent;
     25  background: green;
     26  width: 50px;
     27  height: 100px;
     28 }
     29 </style>
     30 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     31 <div id="flex">
     32  <canvas></canvas>
     33  <div id="item">item</div>
     34 </div>