tor-browser

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

abs-pos-vlr-padding-001.html (1716B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <link rel="author" title="David Shin" href="mailto:dshin@mozilla.com">
      4 <link rel="author" href="https://mozilla.org" title="Mozilla">
      5 <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#block-flow">
      6 <meta name="assert" content="This test checks that absolutely positioned elements are offset correctly in a containing block with a different writing mode and that has padding." />
      7 <link rel="match" href="abs-pos-vlr-padding-001-ref.html">
      8 <style>
      9  body { margin: 0; }
     10  .vert-cb {
     11    position: relative;
     12    width: 150px;
     13    height: 60px;
     14    writing-mode: vertical-lr;
     15    direction: rtl;
     16    background: lightblue;
     17    padding: 1px 2px 3px 4px;
     18    margin-bottom: 2px;
     19  }
     20  .horiz-parent {
     21    width: 120px;
     22    height: 100%;
     23    box-sizing: border-box;
     24    border: solid orange;
     25    border-width: 4px 3px 2px 1px;
     26    writing-mode: horizontal-tb;
     27  }
     28  .abspos {
     29    position: absolute;
     30    /* Specify a height to work around https://bugzilla.mozilla.org/1769102 */
     31    height: 40px;
     32    background: pink;
     33    border: solid black;
     34    border-width: 2px 1px 4px 3px;
     35  }
     36 </style>
     37 <body>
     38  <div class="vert-cb">
     39    <div class="horiz-parent">
     40      <div class="abspos" style="width: max-content">Hello</div>
     41    </div>
     42  </div>
     43  <div class="vert-cb">
     44    <div class="horiz-parent">
     45      <div class="abspos" style="width: 100px">Hello</div>
     46    </div>
     47  </div>
     48  <div class="vert-cb">
     49    <div class="horiz-parent">
     50      <canvas class="abspos" height="40px" width="100px"></canvas>
     51    </div>
     52  </div>
     53  <div class="vert-cb">
     54    <div class="horiz-parent">
     55      <img src="broken" class="abspos" height="40px" width="100px">
     56    </div>
     57  </div>
     58 </body>