tor-browser

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

shape-outside-linear-gradient-009.html (2272B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>CSS Test: Test float with linear gradient under writing-mode: vertical-rl and text-orientation: sideways</title>
      5    <link rel="author" title="Brad Werth" href="mailto:bwerth@mozilla.com"/>
      6    <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
      7    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shapes-from-image"/>
      8    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/>
      9    <link rel="match" href="reference/shape-outside-linear-gradient-001-ref.html"/>
     10    <meta name="fuzzy" content="maxDifference=0-1; totalPixels=7600-8700" />
     11    <meta name="flags" content="ahem"/>
     12    <meta name="assert" content="This test verifies that shape-outside respects a simple linear gradient under vertical-rl and text-orientation: sideways."/>
     13    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     14    <style type="text/css">
     15    .container {
     16      writing-mode: vertical-rl;
     17      text-orientation: sideways;
     18      inline-size: 100px;
     19      block-size: 200px;
     20      background-color: red;
     21      font-family: Ahem;
     22      font-size: 50px;
     23      line-height: 1;
     24    }
     25    #test {
     26      color: green;
     27    }
     28    #float-left {
     29      /* Note: In .container's writing-mode, "float: left" actually floats
     30         us towards the top. */
     31      float: left;
     32      inline-size: 100px;
     33      block-size: 200px;
     34      background: linear-gradient(to bottom, green 50%, transparent 50%);
     35      shape-outside: linear-gradient(to bottom, green 50%, transparent 50%);
     36    }
     37    #float-right {
     38      /* Note: In .container's writing-mode, "float: right" actually floats
     39         us towards the bottom. */
     40      float: right;
     41      inline-size: 100px;
     42      block-size: 200px;
     43      background: linear-gradient(to top, green 50%, transparent 50%);
     44      shape-outside: linear-gradient(to top, green 50%, transparent 50%);
     45    }
     46    </style>
     47  </head>
     48  <body>
     49    <p>
     50      The test passes if you see a green square. There should be no red.
     51    </p>
     52    <div id="test" class="container">
     53      <div id="float-left"></div>
     54      x x x x
     55    </div>
     56    <div id="test" class="container" style="direction: rtl;">
     57      <div id="float-right"></div>
     58      x x x x
     59    </div>
     60  </body>
     61 </html>