tor-browser

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

grid-abspos-staticpos-justify-self-img-001.html (5300B)


      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 grid container, with various "justify-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-justify-self-img-001-ref.html">
     13  <style>
     14    .container {
     15      display: grid;
     16      padding: 2px 1px;
     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      position: relative;
     23    }
     24    br { clear: both }
     25 
     26    .big > .container {
     27      width: 40px;
     28      height: 22px;
     29      grid: 3px 14px 3px / 2px 30px 2px;
     30    }
     31    .small > .container {
     32      grid: 3px 2px 3px / 0px 2px 0px;
     33      width: 2px;
     34      height: 4px;
     35      margin-bottom: 20px; /* to reduce overlap between overflowing images */
     36    }
     37 
     38    .container > * {
     39      position: absolute;
     40      grid-area: 2 / 2 / 3 / 3;
     41    }
     42  </style>
     43 </head>
     44 <body>
     45  <div class="big">
     46    <!-- The various justify-self values, from
     47         https://www.w3.org/TR/css-align-3/#propdef-justify-self -->
     48    <!-- auto | normal | stretch -->
     49    <div class="container"><img src="support/colors-8x16.png"
     50                                style="justify-self: auto"></div>
     51    <div class="container"><img src="support/colors-8x16.png"
     52                                style="justify-self: normal"></div>
     53    <div class="container"><img src="support/colors-8x16.png"
     54                                style="justify-self: stretch"></div>
     55    <br>
     56    <!-- <baseline-position> -->
     57    <div class="container"><img src="support/colors-8x16.png"
     58                                style="justify-self: baseline"></div>
     59    <br>
     60    <!-- <self-position>, part 1 -->
     61    <div class="container"><img src="support/colors-8x16.png"
     62                                style="justify-self: center"></div>
     63    <div class="container"><img src="support/colors-8x16.png"
     64                                style="justify-self: start"></div>
     65    <div class="container"><img src="support/colors-8x16.png"
     66                                style="justify-self: end"></div>
     67    <div class="container"><img src="support/colors-8x16.png"
     68                                style="justify-self: self-start"></div>
     69    <div class="container"><img src="support/colors-8x16.png"
     70                                style="justify-self: self-end"></div>
     71    <br>
     72    <!-- <self-position>, part 2 -->
     73    <div class="container"><img src="support/colors-8x16.png"
     74                                style="justify-self: flex-start"></div>
     75    <div class="container"><img src="support/colors-8x16.png"
     76                                style="justify-self: flex-end"></div>
     77    <div class="container"><img src="support/colors-8x16.png"
     78                                style="justify-self: left"></div>
     79    <div class="container"><img src="support/colors-8x16.png"
     80                                style="justify-self: right"></div>
     81    <br>
     82  </div>
     83  <div class="small">
     84    <!-- The various justify-self values, from
     85         https://www.w3.org/TR/css-align-3/#propdef-justify-self -->
     86    <!-- auto | normal | stretch -->
     87    <div class="container"><img src="support/colors-8x16.png"
     88                                style="justify-self: auto"></div>
     89    <div class="container"><img src="support/colors-8x16.png"
     90                                style="justify-self: normal"></div>
     91    <div class="container"><img src="support/colors-8x16.png"
     92                                style="justify-self: stretch"></div>
     93    <br>
     94    <!-- <baseline-position> -->
     95    <div class="container"><img src="support/colors-8x16.png"
     96                                style="justify-self: baseline"></div>
     97    <br>
     98    <!-- <self-position>, part 1 -->
     99    <div class="container"><img src="support/colors-8x16.png"
    100                                style="justify-self: center"></div>
    101    <div class="container"><img src="support/colors-8x16.png"
    102                                style="justify-self: start"></div>
    103    <div class="container"><img src="support/colors-8x16.png"
    104                                style="justify-self: end"></div>
    105    <div class="container"><img src="support/colors-8x16.png"
    106                                style="justify-self: self-start"></div>
    107    <div class="container"><img src="support/colors-8x16.png"
    108                                style="justify-self: self-end"></div>
    109    <br>
    110    <!-- <self-position>, part 2 -->
    111    <div class="container"><img src="support/colors-8x16.png"
    112                                style="justify-self: flex-start"></div>
    113    <div class="container"><img src="support/colors-8x16.png"
    114                                style="justify-self: flex-end"></div>
    115    <div class="container"><img src="support/colors-8x16.png"
    116                                style="justify-self: left"></div>
    117    <div class="container"><img src="support/colors-8x16.png"
    118                                style="justify-self: right"></div>
    119    <br>
    120  </div>
    121 </body>
    122 </html>