tor-browser

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

grid-item-align-003-ref.html (3270B)


      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>Reference: align-self with overflow</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 body { margin:40px; }
     15 separator { clear:both; display:block; height:6px; }
     16 
     17 .grid {
     18  display: block;
     19  float: left;
     20  position: relative;
     21  border: 1px solid;
     22  /* border-block-start: 2px solid blue; */
     23  border-block-start: 2px solid black;
     24  inline-size: 36px;
     25  block-size: 25px;
     26  margin-right: 20px;
     27  margin-bottom: 20px;
     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  position: absolute;
     42  width: 40px;
     43  height: 30px;
     44  background: grey;
     45  border-block-start: 2px solid blue;
     46  border-inline-start: 2px solid lime;
     47  margin: 1px 1px 2px 2px;
     48  justify-self: start;
     49 }
     50 
     51 abs1,abs2,abs3,abs4 {
     52  position: absolute;
     53  top:0;left:0;bottom:0;right:0;
     54  background: lightgrey;
     55 }
     56 abs1 { bottom: 22px; }
     57 abs2 { top: 23px; }
     58 abs3 { left: 33px; }
     59 abs4 { right: 35px; }
     60 
     61 .hl { writing-mode: horizontal-tb; direction:ltr; }
     62 .hr { writing-mode: horizontal-tb; direction:rtl; }
     63 .vl { writing-mode: vertical-lr; }
     64 .vr { writing-mode: vertical-rl; }
     65 .vlr { writing-mode: vertical-lr; direction:rtl; }
     66 .vrl { writing-mode: vertical-rl; direction:ltr; }
     67 
     68 .unsafe.hl.aend,  .unsafe.hl.aflexend  { inset-block-start:-15px; }
     69 .unsafe.vrl.aend, .unsafe.vrl.aflexend { inset-inline-start:-15px; }
     70 .unsafe.hl.acenter { inset-block-start:-7px; }
     71 .unsafe.vrl.acenter { inset-inline-start:-7px; }
     72 .astretch2 { width:40px; height:15px; }
     73 .astretch3 { height:15px; }
     74 .astretch4 { width:0; }
     75 .astretch5 { width:0; max-width:38px; }
     76 .astretch6 { height:15px; max-height:30px; }
     77 .astretch7 { width:0; height:15px; max-width:38px; max-height:30px; }
     78 
     79 
     80 </style>
     81 </head>
     82 <body>
     83 
     84 <script>
     85 var gridwm = [ "hl" ];
     86 var wm = [ "hl unsafe", "vrl unsafe", "hl safe", "vrl safe" ];
     87 var test = [ "start", "end", "flexstart", "flexend", "center", "left", "right",
     88             "stretch1", "stretch2", "stretch3", "stretch4", "stretch5",
     89             "stretch6", "stretch7", "auto" ];
     90 for (var i = 0; i < gridwm.length; ++i) {
     91  for (var j = 0; j < wm.length; ++j) {
     92    for (var k = 0; k < test.length; ++k) {
     93      var div = document.createElement("div");
     94      div.className = "grid " + gridwm[i];
     95      var wrap = document.createElement("wrap");
     96      div.appendChild(wrap);
     97      var span = document.createElement("span");
     98      span.className = wm[j] + " a" + test[k];
     99      div.appendChild(span);
    100      wrap.appendChild(span);
    101      div.appendChild(document.createElement("abs1"));
    102      div.appendChild(document.createElement("abs2"));
    103      div.appendChild(document.createElement("abs3"));
    104      div.appendChild(document.createElement("abs4"));
    105 
    106      document.body.appendChild(div)
    107    }
    108    document.body.appendChild(document.createElement("separator"));
    109  }
    110 }
    111 </script>
    112 
    113 
    114 </body>
    115 </html>