tor-browser

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

all-prop-002.html (1330B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>CSS Cascade: all:inherit includes display:inherit</title>
      6  <link rel="author" title="Chris Rebert" href="http://chrisrebert.com">
      7  <link rel="help" href="http://www.w3.org/TR/css-cascade-3/#all-shorthand">
      8  <link rel="help" href="http://www.w3.org/TR/css-cascade-4/#all-shorthand">
      9  <link rel="match" href="reference/ref-filled-green-100px-square.xht">
     10  <meta name="assert" content="all:inherit should cause display:inherit so the red divs will display inline/horizontal (like their parent span) rather than block/vertical (like the default UA style for a div).">
     11  <style>
     12 .inline {
     13  all: inherit;/* inherit display:inline from span */
     14 }
     15 .half-red-sq {
     16  /* half of a red square */
     17  display: inline-block;
     18  width: 50px;
     19  height: 100px;
     20  background-color: red;
     21 }
     22 #positioned {
     23  position: relative;
     24 }
     25 #green-sq {
     26  position: absolute;/* put higher on Z axis */
     27  width: 100px;
     28  height: 100px;
     29  background-color: green;
     30 }
     31  </style>
     32 </head>
     33 <body>
     34  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     35  <div id="positioned">
     36    <div id="green-sq"></div>
     37    <span>
     38      <div class="inline"><div class="half-red-sq"></div></div><div class="inline"><div class="half-red-sq"></div></div>
     39    </span>
     40  </div>
     41 </body>
     42 </html>