tor-browser

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

shape-outside-linear-gradient-005.html (2177B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>CSS Test: Test float with linear gradient under writing-mode: vertical-rl</title>
      5    <link rel="author" title="Ting-Yu Lin" href="mailto:aethanyc@gmail.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."/>
     13    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     14    <style type="text/css">
     15    .container {
     16      writing-mode: vertical-rl;
     17      inline-size: 100px;
     18      block-size: 200px;
     19      background-color: red;
     20      font-family: Ahem;
     21      font-size: 50px;
     22      line-height: 1;
     23    }
     24    #test {
     25      color: green;
     26    }
     27    #float-left {
     28      /* Note: In .container's writing-mode, "float: left" actually floats
     29         us towards the top. */
     30      float: left;
     31      inline-size: 100px;
     32      block-size: 200px;
     33      background: linear-gradient(to bottom, green 50%, transparent 50%);
     34      shape-outside: linear-gradient(to bottom, green 50%, transparent 50%);
     35    }
     36    #float-right {
     37      /* Note: In .container's writing-mode, "float: right" actually floats
     38         us towards the bottom. */
     39      float: right;
     40      inline-size: 100px;
     41      block-size: 200px;
     42      background: linear-gradient(to top, green 50%, transparent 50%);
     43      shape-outside: linear-gradient(to top, green 50%, transparent 50%);
     44    }
     45    </style>
     46  </head>
     47  <body>
     48    <p>
     49      The test passes if you see a green square. There should be no red.
     50    </p>
     51    <div id="test" class="container">
     52      <div id="float-left"></div>
     53      x x x x
     54    </div>
     55    <div id="test" class="container" style="direction: rtl;">
     56      <div id="float-right"></div>
     57      x x x x
     58    </div>
     59  </body>
     60 </html>