tor-browser

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

grid-item-justify-002.html (3511B)


      1 <!DOCTYPE HTML>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     http://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <html><head>
      7  <meta charset="utf-8">
      8  <title>CSS Grid Test: justify-self (part 2 of 2)</title>
      9  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1151213">
     10  <link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
     11  <link rel="match" href="grid-item-justify-002-ref.html">
     12  <style type="text/css">
     13 html,body {
     14    color:black; background-color:white; font-size:16px; padding:0; margin:0;
     15 }
     16 separator { clear:both; display:block; height:6px; }
     17 
     18 .grid {
     19  display: grid;
     20  float: left;
     21  position: relative;
     22  border: 1px solid;
     23  /* border-inline-start: 2px solid lime; */
     24  border-inline-start: 2px solid black;
     25  grid-template: 3px 20px 2px / 1px 32px 3px;
     26  margin-right: 4px;
     27 }
     28 
     29 span {
     30  grid-area: 2 / 2; /* the center 32 x 20 pixel area */
     31  display: block;
     32  width: 13px;
     33  height: 9px;
     34  background: grey;
     35  border-block-start: 2px solid blue;
     36  border-inline-start: 2px solid lime;
     37  margin: 1px 1px 2px 2px;
     38  align-self: start;
     39 }
     40 
     41 abs1,abs2,abs3,abs4 {
     42  position: absolute;
     43  top:0;left:0;bottom:0;right:0;
     44  background: lightgrey;
     45 }
     46 abs1 { grid-area: 1 / 1 / 2 / 4; }
     47 abs2 { grid-area: 1 / 1 / 4 / 2; }
     48 abs3 { grid-area: 1 / 3 / 4 / 4; }
     49 abs4 { grid-area: 3 / 1 / 4 / 4; }
     50 
     51 .hl { writing-mode: horizontal-tb; direction:ltr; }
     52 .hr { writing-mode: horizontal-tb; direction:rtl; }
     53 .vl { writing-mode: vertical-lr; }
     54 .vr { writing-mode: vertical-rl; }
     55 .vlr { writing-mode: vertical-lr; direction:rtl; }
     56 .vrl { writing-mode: vertical-rl; direction:ltr; }
     57 
     58 .jstart { justify-self:start; }
     59 .jend { justify-self:end; }
     60 .jflexstart { justify-self:flex-start; }
     61 .jflexend { justify-self:flex-end; }
     62 .jselfstart { justify-self:self-start; }
     63 .jselfend { justify-self:self-end; }
     64 .jcenter { justify-self:center; }
     65 .jleft { justify-self:left; }
     66 .jright { justify-self:right; }
     67 .jstretch1 { justify-self:stretch; }
     68 .jstretch2 { justify-self:stretch; width:13px; height:auto; }
     69 .jstretch3 { justify-self:stretch; height:auto; }
     70 .jstretch4 { justify-self:stretch; width:auto; }
     71 .jstretch5 { justify-self:stretch; width:auto; max-width:13px; }
     72 .jstretch6 { justify-self:stretch; height:auto; max-height:9px; }
     73 .jstretch7 { justify-self:stretch; width:auto; height:auto; max-width:13px; max-height:9px; }
     74 .jauto { justify-self:auto; }
     75 
     76 </style>
     77 </head>
     78 <body>
     79 
     80 <script>
     81 var gridwm = [ "vr", "vlr", "vrl" ]; // grid-item-justify-001.html tests hl/hr/vl
     82 var wm = [ "hl", "hr", "vl", "vr", "vlr", "vrl" ];
     83 var test = [ "start", "end", "flexstart", "flexend", "center", "left", "right",
     84             "stretch1", "stretch2", "stretch3", "stretch4", "stretch5",
     85             "stretch6", "stretch7", "auto" ];
     86 for (var i = 0; i < gridwm.length; ++i) {
     87  for (var j = 0; j < wm.length; ++j) {
     88    for (var k = 0; k < test.length; ++k) {
     89      var div = document.createElement("div");
     90      div.className = "grid " + gridwm[i];
     91      var span = document.createElement("span");
     92      span.className = wm[j] + " j" + test[k];
     93      div.appendChild(span);
     94      div.appendChild(document.createElement("abs1"));
     95      div.appendChild(document.createElement("abs2"));
     96      div.appendChild(document.createElement("abs3"));
     97      div.appendChild(document.createElement("abs4"));
     98 
     99      document.body.appendChild(div)
    100    }
    101    document.body.appendChild(document.createElement("separator"));
    102  }
    103 }
    104 </script>
    105 
    106 
    107 </body>
    108 </html>