tor-browser

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

grid-align-content-vertical-rl.html (6086B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Grid Layout test: align-content in vertical-rl</title>
      4 <link rel="author" title="Rossana Monteriso" href="mailto:rmonteriso@igalia.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-direction">
      6 <link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-align">
      7 <link rel="help" href="https://drafts.csswg.org/css-align-3/#alignment-values">
      8 <link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#direction">
      9 <meta name="assert" content="This test checks that the align-content property is applied correctly in vertical-rl grids, for both LTR and RTL directions.">
     10 <meta name="flags" content="ahem">
     11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     12 <link rel="stylesheet" href="/css/support/grid.css">
     13 <link rel="stylesheet" href="/css/support/alignment.css">
     14 
     15 <style>
     16 
     17 .grid {
     18    grid: 100px 100px / 50px 50px;
     19    position: relative;
     20    width: 300px;
     21    height: 200px;
     22 }
     23 
     24 .cell {
     25    width: 20px;
     26    height: 40px;
     27 }
     28 
     29 </style>
     30 
     31 <script src="/resources/testharness.js"></script>
     32 <script src="/resources/testharnessreport.js"></script>
     33 <script src="/resources/check-layout-th.js"></script>
     34 <script type="text/javascript">
     35  setup({ explicit_done: true });
     36 </script>
     37 
     38 <body onload="document.fonts.ready.then(() => { checkLayout('.grid'); })">
     39 
     40 <div style="position: relative">
     41    <p>direction: LTR | align-content: 'center'</p>
     42    <div class="grid verticalRL alignContentCenter" data-expected-width="300" data-expected-height="200">
     43        <div class="cell firstRowFirstColumn" data-offset-x="230" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
     44        <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
     45        <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
     46        <div class="cell secondRowSecondColumn" data-offset-x="130" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
     47    </div>
     48 </div>
     49 
     50 <div style="position: relative">
     51    <p>direction: LTR | align-content: 'start'</p>
     52    <div class="grid verticalRL alignContentStart" data-expected-width="300" data-expected-height="200">
     53        <div class="cell firstRowFirstColumn" data-offset-x="280" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
     54        <div class="firstRowSecondColumn" data-offset-x="200" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
     55        <div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
     56        <div class="cell secondRowSecondColumn" data-offset-x="180" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
     57    </div>
     58 </div>
     59 
     60 <div style="position: relative">
     61    <p>direction: LTR | align-content: 'end'</p>
     62    <div class="grid verticalRL alignContentEnd" data-expected-width="300" data-expected-height="200">
     63        <div class="cell firstRowFirstColumn" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
     64        <div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
     65        <div class="secondRowFirstColumn" data-offset-x="00" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
     66        <div class="cell secondRowSecondColumn" data-offset-x="80" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
     67    </div>
     68 </div>
     69 
     70 <!-- RTL direction. -->
     71 <div style="position: relative">
     72    <p>direction: RTL | align-content: 'center'</p>
     73    <div class="grid directionRTL verticalRL alignContentCenter" data-expected-width="300" data-expected-height="200">
     74        <div class="cell firstRowFirstColumn" data-offset-x="230" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
     75        <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
     76        <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
     77        <div class="cell secondRowSecondColumn" data-offset-x="130" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
     78    </div>
     79 </div>
     80 
     81 <div style="position: relative">
     82    <p>direction: RTL | align-content: 'start'</p>
     83    <div class="grid directionRTL verticalRL alignContentStart" data-expected-width="300" data-expected-height="200">
     84        <div class="cell firstRowFirstColumn" data-offset-x="280" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
     85        <div class="firstRowSecondColumn" data-offset-x="200" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
     86        <div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
     87        <div class="cell secondRowSecondColumn" data-offset-x="180" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
     88    </div>
     89 </div>
     90 
     91 <div style="position: relative">
     92    <p>direction: RTL | align-content: 'end'</p>
     93    <div class="grid directionRTL verticalRL alignContentEnd" data-expected-width="300" data-expected-height="200">
     94        <div class="cell firstRowFirstColumn" data-offset-x="180" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
     95        <div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
     96        <div class="secondRowFirstColumn" data-offset-x="00" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
     97        <div class="cell secondRowSecondColumn" data-offset-x="80" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
     98    </div>
     99 </div>
    100 
    101 </body>