tor-browser

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

grid-abspos-staticpos-align-self-img-last-baseline-002.html (1683B)


      1 <!DOCTYPE html>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     http://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <html>
      7 <head>
      8  <meta charset="utf-8">
      9  <title>CSS Test: Static position of abspos replaced children in a static-pos grid container, with various "align-self" values</title>
     10  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
     11  <link rel="help" href="https://drafts.csswg.org/css-grid/#abspos-items">
     12  <link rel="match" href="grid-abspos-staticpos-align-self-img-last-baseline-002-ref.html">
     13  <style>
     14    .container {
     15      display: grid;
     16      padding: 1px 2px;
     17      border: 1px solid black;
     18      background: yellow;
     19      margin-bottom: 5px;
     20      margin-right: 5px;
     21      float: left; /* For testing in "rows" of containers */
     22    }
     23    br { clear: both }
     24 
     25    .big > .container {
     26      height: 40px;
     27      width: 22px;
     28      grid: 2px 30px 2px / 3px 14px 3px;
     29    }
     30    .small > .container {
     31      grid: 0px 2px 0px / 3px 2px 3px;
     32      height: 2px;
     33      width: 4px;
     34      margin-bottom: 20px; /* to reduce overlap between overflowing images */
     35    }
     36 
     37    .container > * {
     38      position: absolute;
     39      grid-area: 2 / 2 / 3 / 3;
     40    }
     41  </style>
     42 </head>
     43 <body>
     44  <!-- The last baseline value, from
     45       https://www.w3.org/TR/css-align-3/#propdef-align-self -->
     46  <div class="big">
     47    <div class="container"><img src="support/colors-8x16.png"
     48                                style="align-self: last baseline"></div>
     49  </div>
     50  <div class="small">
     51    <div class="container"><img src="support/colors-8x16.png"
     52                                style="align-self: last baseline"></div>
     53  </div>
     54 </body>
     55 </html>