tor-browser

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

absolute-tables-001.html (3421B)


      1 <!doctype html>
      2 <script src='/resources/testharness.js'></script>
      3 <script src='/resources/testharnessreport.js'></script>
      4 <script src='/resources/check-layout-th.js'></script>
      5 <link rel="author" title="Anders Ruud" href="mailto:andruud@chromium.org">
      6 <link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
      7 <link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#the-width-property" title="See Note in <percentage>">
      8 <meta name="assert" content="percent lengths of an abspos table are resolved against the padding box of the parent" />
      9 <style>
     10    main div {
     11        position: relative;
     12        border: 5px solid black;
     13        height: 60px;
     14        width: 60px;
     15        padding: 5px 7px 11px 13px;
     16        margin: 10px;
     17    }
     18 
     19    .tbl {
     20        display: table;
     21        background-color: skyblue;
     22        position: absolute;
     23        width: 50%;
     24        height: 50%;
     25    }
     26 
     27    .cell {
     28        display: table-cell;
     29        outline: 1px dashed blue;
     30    }
     31 
     32    .topleft { left: 0; top: 0; }
     33    .topright { right: 0; top: 0; }
     34    .bottomright { right: 0; bottom: 0; }
     35    .bottomleft { left: 0; bottom: 0; }
     36 
     37    .vertical  { writing-mode: vertical-lr; }
     38 
     39 </style>
     40 <p>Tests that percent lengths of an absolutely positioned table is resolved
     41 against the <em>padding box</em> of the parent.
     42 <hr>
     43 <output id="log"></output>
     44 <main>
     45 <div>
     46  <span class="tbl topleft" data-expected-client-width=40 data-expected-client-height=38 data-offset-x=0 data-offset-y=0>
     47    <span class="cell" data-expected-client-width=40 data-expected-client-height=38>abc</span>
     48  </span>
     49 </div>
     50 <div>
     51  <span class="tbl topright" data-expected-client-width=40 data-expected-client-height=38 data-offset-x=40 data-offset-y=0>
     52    <span class="cell" data-expected-client-width=40 data-expected-client-height=38>abc</span>
     53  </span>
     54 </div>
     55 <div>
     56  <span class="tbl bottomright" data-expected-client-width=40 data-expected-client-height=38 data-offset-x=40 data-offset-y=38>
     57    <span class="cell" data-expected-client-width=40 data-expected-client-height=38>abc</span>
     58  </span>
     59 </div>
     60 <div>
     61  <span class="tbl bottomleft" data-expected-client-width=40 data-expected-client-height=38 data-offset-x=0 data-offset-y=38>
     62    <span class="cell" data-expected-client-width=40 data-expected-client-height=38>abc</span>
     63  </span>
     64 </div>
     65 
     66 <div class="vertical">
     67  <span class="tbl topleft" data-expected-client-width=40 data-expected-client-height=38 data-offset-x=0 data-offset-y=0>
     68    <span class="cell" data-expected-client-width=40 data-expected-client-height=38>abc</span>
     69  </span>
     70 </div>
     71 <div class="vertical">
     72  <span class="tbl topright" data-expected-client-width=40 data-expected-client-height=38 data-offset-x=40 data-offset-y=0>
     73    <span class="cell" data-expected-client-width=40 data-expected-client-height=38>abc</span>
     74  </span>
     75 </div>
     76 <div class="vertical">
     77  <span class="tbl bottomright" data-expected-client-width=40 data-expected-client-height=38 data-offset-x=40 data-offset-y=38>
     78    <span class="cell" data-expected-client-width=40 data-expected-client-height=38>abc</span>
     79  </span>
     80 </div>
     81 <div class="vertical">
     82  <span class="tbl bottomleft" data-expected-client-width=40 data-expected-client-height=38 data-offset-x=0 data-offset-y=38>
     83    <span class="cell" data-expected-client-width=40 data-expected-client-height=38>abc</span>
     84  </span>
     85 </div>
     86 </main>
     87 <script>
     88    checkLayout(".tbl");
     89 </script>