tor-browser

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

column-grid-lanes-alignment-positioned-items-003.html (2530B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>CSS Grid Lanes Test: Mixed alignment values for positioned items</title>
      6  <link rel="author" title="Yanling Wang" href="mailto:yanlingwang@microsoft.com">
      7  <link rel="help" href="https://drafts.csswg.org/css-grid-3/#abspos">
      8  <link rel="help" href="https://drafts.csswg.org/css-grid-3/#alignment">
      9  <link rel="match" href="column-grid-lanes-alignment-positioned-items-003-ref.html">
     10  <style>
     11    html,body {
     12      color:black; background-color:white; font:8px/1 monospace; padding:0; margin:0;
     13    }
     14 
     15    .grid-lanes {
     16      position: relative;
     17      display: grid-lanes;
     18      grid-template-columns: 90px 90px 90px;
     19      width: 320px;
     20      height: 150px;
     21      gap: 10px;
     22      padding: 15px;
     23      border: 2px solid black;
     24      margin: 10px;
     25    }
     26 
     27    .grid-lanes > div {
     28      position: absolute;
     29      border: 1px solid #333;
     30      width: 70px;
     31      height: 30px;
     32      display: flex;
     33      align-items: center;
     34      justify-content: center;
     35    }
     36 
     37    .flex-start-item {
     38      grid-column: 1 / 2;
     39      align-self: flex-start;
     40      justify-self: flex-start;
     41      background: lightcoral;
     42    }
     43 
     44    .flex-end-item {
     45      grid-column: 2 / 3;
     46      align-self: flex-end;
     47      justify-self: flex-end;
     48      background: lightblue;
     49    }
     50 
     51    .mixed-legacy {
     52      grid-column: 3 / 4;
     53      align-self: flex-start;
     54      justify-self: end;
     55      background: lightgreen;
     56    }
     57 
     58    .normal-item {
     59      grid-column: 1 / 2;
     60      align-self: normal;
     61      justify-self: normal;
     62      background: lightyellow;
     63    }
     64 
     65    .auto-item {
     66      grid-column: 2 / 3;
     67      align-self: auto;
     68      justify-self: auto;
     69      background: plum;
     70    }
     71 
     72    .legacy-center {
     73      grid-column: 3 / 4;
     74      align-self: flex-start;
     75      justify-self: center;
     76      background: orange;
     77    }
     78  </style>
     79 </head>
     80 <body>
     81  <div class="grid-lanes">
     82    <div class="flex-start-item">flex-start</div>
     83    <div class="flex-end-item">flex-end</div>
     84    <div class="mixed-legacy">mixed</div>
     85    <div class="normal-item">normal</div>
     86    <div class="auto-item">auto</div>
     87    <div class="legacy-center">legacy-center</div>
     88  </div>
     89 
     90  <div class="grid-lanes" style="direction: rtl;">
     91    <div class="flex-start-item">flex-start</div>
     92    <div class="flex-end-item">flex-end</div>
     93    <div class="mixed-legacy">mixed</div>
     94    <div class="normal-item">normal</div>
     95    <div class="auto-item">auto</div>
     96    <div class="legacy-center">legacy-center</div>
     97  </div>
     98 </body>
     99 </html>