tor-browser

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

dynamic-top-change-005b.xht (1804B)


      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3  <head>
      4   <title>CSS Test: Inheriting 'top' changes from abspos grandparent (non-dynamic variant)</title>
      5   <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
      6   <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
      7   <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
      8   <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit"/>
      9   <link rel="help" href="http://www.w3.org/TR/css-cascade-3/#inherit"/>
     10   <link rel="help" href="http://www.w3.org/TR/css-cascade-4/#inherit"/>
     11   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props"/>
     12   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position"/>
     13   <meta name="flags" content="dom" />
     14   <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed."/>
     15   <style type="text/css"><![CDATA[
     16     .testDiv { position: relative; width: 100px; height: 100px; }
     17     #green { top: 100px; background: green; }
     18     #red { top: inherit; background: red; display: block; }
     19     #parent { position: relative; top: 50px; }
     20     body > p { position: absolute; font-size: medium; }
     21     #grandparent { position: absolute; top: 0; }
     22     body { font-size: 0; line-height: 0; position: relative; }
     23   ]]></style>
     24  </head>
     25  <body>
     26    <p>Test passes if there is no red.</p>
     27    <div id="grandparent">
     28      <span id="parent">
     29        <span id="red" class="testDiv"></span>
     30      </span>
     31    </div>
     32    <div id="green" class="testDiv"></div>
     33  </body>
     34 </html>