tor-browser

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

grid-item-justify-002-ref.html (3625B)


      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  <style type="text/css">
     11 html,body {
     12    color:black; background-color:white; font-size:16px; padding:0; margin:0;
     13 }
     14 separator { clear:both; display:block; height:6px; }
     15 
     16 .grid {
     17  display: block;
     18  float: left;
     19  position: relative;
     20  border: 1px solid;
     21  /* border-inline-start: 2px solid lime; */
     22  border-inline-start: 2px solid black;
     23  inline-size: 36px;
     24  block-size: 25px;
     25  margin-right: 4px;
     26  background: lightgrey;
     27 }
     28 
     29 wrap {
     30  display: block;
     31  position: relative;
     32  inset-inline-start: 1px;
     33  background: white;
     34  block-size: 20px;
     35  inline-size: 32px;
     36  border-block-start: 3px solid lightgrey;
     37 }
     38 
     39 span {
     40  display: block;
     41  width: 13px;
     42  height: 9px;
     43  background: grey;
     44  border-block-start: 2px solid blue;
     45  border-inline-start: 2px solid lime;
     46  margin: 1px 1px 2px 2px;
     47  align-self: start;
     48 }
     49 
     50 abs1,abs2,abs3,abs4 {
     51  position: absolute;
     52  top:0;left:0;bottom:0;right:0;
     53  background: lightgrey;
     54 }
     55 abs1 { grid-area: 1 / 1 / 2 / 4; }
     56 abs2 { grid-area: 1 / 1 / 4 / 2; }
     57 abs3 { grid-area: 1 / 3 / 4 / 4; }
     58 abs4 { grid-area: 3 / 1 / 4 / 4; }
     59 
     60 .hl { writing-mode: horizontal-tb; direction:ltr; }
     61 .hr { writing-mode: horizontal-tb; direction:rtl; }
     62 .vl { writing-mode: vertical-lr; }
     63 .vr { writing-mode: vertical-rl; }
     64 .vlr { writing-mode: vertical-lr; direction:rtl; }
     65 .vrl { writing-mode: vertical-rl; direction:ltr; }
     66 
     67 .jstart { justify-self:start; }
     68 .jend { justify-self:end; }
     69 .jflexstart { justify-self:flex-start; }
     70 .jflexend { justify-self:flex-end; }
     71 .jselfstart { justify-self:self-start; }
     72 .jselfend { justify-self:self-end; }
     73 .jcenter { justify-self:center; }
     74 .jleft { justify-self:left; }
     75 .jright { justify-self:right; }
     76 .jstretch1 { justify-self:stretch; }
     77 .jstretch2 { justify-self:stretch; width:13px; height:27px; }
     78 .jstretch3 { justify-self:stretch; height:27px; }
     79 .jstretch4 { justify-self:stretch; width:auto; }
     80 .jstretch5 { justify-self:stretch; width:auto; max-width:13px; }
     81 .jstretch6 { justify-self:stretch; height:9px; max-height:9px; }
     82 .jstretch7 { justify-self:stretch; width:auto; height:9px; max-width:13px; max-height:9px; }
     83 .jauto { justify-self:auto; }
     84 
     85 .vr .jend, .vr .jflexend, .vr .jright,
     86 .vrl .jend, .vrl .jflexend, .vrl .jright { margin-top: 19px; }
     87 .vlr .jend, .vlr .jflexend, .vlr .jleft { margin-bottom: 20px;}
     88 .vr .jcenter, .vrl .jcenter { margin-top: 10px; }
     89 .vlr .jcenter { margin-bottom: 11px; }
     90 
     91 </style>
     92 </head>
     93 <body>
     94 
     95 <script>
     96 var gridwm = [ "vr", "vlr", "vrl" ]; // grid-item-justify-001.html tests hl/hr/vl
     97 var wm = [ "hl", "hr", "vl", "vr", "vlr", "vrl" ];
     98 var test = [ "start", "end", "flexstart", "flexend", "center", "left", "right",
     99             "stretch1", "stretch2", "stretch3", "stretch4", "stretch5",
    100             "stretch6", "stretch7", "auto" ];
    101 for (var i = 0; i < gridwm.length; ++i) {
    102  for (var j = 0; j < wm.length; ++j) {
    103    for (var k = 0; k < test.length; ++k) {
    104      var div = document.createElement("div");
    105      div.className = "grid " + gridwm[i];
    106      var wrap = document.createElement("wrap");
    107      div.appendChild(wrap);
    108      var span = document.createElement("span");
    109      span.className = wm[j] + " j" + test[k];
    110      wrap.appendChild(span);
    111      document.body.appendChild(div)
    112    }
    113    document.body.appendChild(document.createElement("separator"));
    114  }
    115 }
    116 </script>
    117 
    118 
    119 </body>
    120 </html>