tor-browser

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

shape-outside-linear-gradient-013.html (2324B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>CSS Test: Test float with linear gradient under writing-mode: sideways-rl</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="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin-property"/>
     10    <link rel="match" href="reference/shape-outside-linear-gradient-001-ref.html"/>
     11    <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-8700"/>
     12    <meta name="flags" content="ahem"/>
     13    <meta name="assert" content="This test verifies that shape-outside respects a simple linear gradient with shape-margin under sideways-rl."/>
     14    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     15    <style type="text/css">
     16    .container {
     17      writing-mode: sideways-rl;
     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 25%, transparent 25%);
     36      shape-margin: 25%;
     37    }
     38    #float-right {
     39      /* Note: In .container's writing-mode, "float: right" actually floats
     40         us towards the bottom. */
     41      float: right;
     42      inline-size: 100px;
     43      block-size: 200px;
     44      background: linear-gradient(to top, green 50%, transparent 50%);
     45      shape-outside: linear-gradient(to top, green 5%, transparent 5%);
     46      shape-margin: 45%
     47    }
     48    </style>
     49  </head>
     50  <body>
     51    <p>
     52      The test passes if you see a green square. There should be no red.
     53    </p>
     54    <div id="test" class="container">
     55      <div id="float-left"></div>
     56      x x x x
     57    </div>
     58    <div id="test" class="container" style="direction: rtl;">
     59      <div id="float-right"></div>
     60      x x x x
     61    </div>
     62  </body>
     63 </html>