tor-browser

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

grid-gap-decorations-039.html (1558B)


      1 <!DOCTYPE html>
      2 <title>
      3  CSS Gap Decorations: grid column gaps are painted with solid styling.
      4 </title>
      5 <link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
      6 <link rel="match" href="../agnostic/gap-decorations-006-ref.html">
      7 <link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com">
      8 <style>
      9  body {
     10    margin: 0px;
     11  }
     12 
     13  .grid-container {
     14    height: 110px;
     15    width: 110px;
     16 
     17    display: grid;
     18    grid-template-columns: repeat(2, 1fr);
     19 
     20    column-gap: 10px;
     21    row-gap: 10px;
     22 
     23    column-rule-color: pink;
     24    column-rule-style: solid;
     25    column-rule-width: 10px;
     26 
     27    row-rule-color: green;
     28    row-rule-style: solid;
     29    row-rule-width: 10px;
     30  }
     31 
     32  .grid-item {
     33    background: skyblue;
     34  }
     35 </style>
     36 <script>
     37  function setup() {
     38    const button = document.getElementById('btn');
     39    button.click();
     40  }
     41 
     42  function setDecorations() {
     43    const container = document.querySelector('.grid-container');
     44    if (container) {
     45      container.style.columnRuleStyle = 'solid';
     46      container.style.columnRuleWidth = '10px';
     47      container.style.columnRuleColor = 'pink';
     48      container.style.rowRuleStyle = 'solid';
     49      container.style.rowRuleWidth = '10px';
     50      container.style.rowRuleColor = 'green';
     51    }
     52  }
     53 </script>
     54 
     55 <body onload="setup()">
     56  <div class="grid-container">
     57    <div class="grid-item"></div>
     58    <div class="grid-item"></div>
     59    <div class="grid-item"></div>
     60    <div class="grid-item"></div>
     61  </div>
     62  <button onclick="setDecorations()" id="btn">Set decorations</button>
     63 </body>