tor-browser

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

orthogonal-positioned-grid-items-010.html (1488B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Grid Layout Test: Orthogonal positioned grid items</title>
      4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
      6 <link rel="match" href="orthogonal-positioned-grid-items-009-ref.html">
      7 <meta name="assert" content="Checks that absolutely positioned orthogonal grid items are properly placed and sized when they have a static position (left/rigth and top/bottom are 'auto') and a specific size.">
      8 <style>
      9 #grid {
     10  display: grid;
     11  grid: 150px 100px / 200px 300px;
     12  margin: 1px 2px 3px 4px;
     13  padding: 20px 15px 10px 5px;
     14  border-width: 9px 3px 12px 6px;
     15  border-style: solid;
     16  width: 550px;
     17  height: 400px;
     18  position: relative;
     19 }
     20 
     21 #grid > div {
     22  writing-mode: vertical-lr;
     23  position: absolute;
     24  width: 100%;
     25  height: 100%;
     26 }
     27 
     28 #firstItem {
     29  background: magenta;
     30  grid-column: 1 / 2;
     31  grid-row: 1 / 2;
     32 }
     33 
     34 #secondItem {
     35  background: cyan;
     36  grid-column: 2 / 3;
     37  grid-row: 1 / 2;
     38 }
     39 
     40 #thirdItem {
     41  background: yellow;
     42  grid-column: 1 / 2;
     43  grid-row: 2 / 3;
     44 }
     45 
     46 #fourthItem {
     47  background: lime;
     48  grid-column: 2 / 3;
     49  grid-row: 2 / 3;
     50 }
     51 </style>
     52 
     53 <p>The test passes if it has the same output than the reference.</p>
     54 
     55 <div id="grid">
     56  <div id="firstItem">First item</div>
     57  <div id="secondItem">Second item</div>
     58  <div id="thirdItem">Third item</div>
     59  <div id="fourthItem">Fourth item</div>
     60 </div>