tor-browser

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

shape-outside-008.html (3950B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4    <title>CSS Test: Shape smaller than float content area - 2 floats</title>
      5    <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"/>
      6    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#relation-to-box-model-and-float-behavior"/>
      7    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#supported-basic-shapes"/>
      8    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/>
      9    <link rel="match" href="reference/shape-outside-008-ref.html"/>
     10    <meta name="flags" content="ahem"/>
     11    <meta name="assert" content="This test verifies that inline content only wraps around the
     12                                 shapes, and otherwise overlays the rest of the float margin
     13                                 boxes when two floats are stacked next to each other."/>
     14     <!-- This test is derived from Example 5 in this version of the spec:
     15          http://www.w3.org/TR/2013/WD-css-shapes-1-20131203/ -->
     16      <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     17      <style type="text/css">
     18          .container {
     19            width: 260px;
     20            font-family: Ahem;
     21            font-size: 15px;
     22            line-height: 2em;
     23            border: 1px solid black;
     24            padding-left: 2px;
     25          }
     26          #test {
     27              color: green;
     28          }
     29          .test-float-left {
     30              shape-outside: polygon(0 70px, 50px 120px, 0 120px);
     31              float: left;
     32              width: 100px;
     33              height: 100px;
     34              margin-top: 20px;
     35          }
     36          #test, #failure-container {
     37              position: absolute;
     38              top: 70px;
     39          }
     40          #margin-line {
     41              position: absolute;
     42              top: 100px;
     43              width: 263px;
     44              border-bottom: 1px solid black;
     45          }
     46          .fail {
     47              position: absolute;
     48              height: 15px;
     49              background-color: red;
     50              z-index: -1;
     51          }
     52          #bar-1 {
     53              top: 8px;
     54              left: 3px;
     55              width: 255px;
     56          }
     57          #bar-2 {
     58              top: 38px;
     59              left: 3px;
     60              width: 255px;
     61          }
     62          #bar-3 {
     63              top: 68px;
     64              left: 23px;
     65              width: 225px;
     66          }
     67          #bar-4 {
     68              top: 98px;
     69              left: 123px;
     70              width: 135px;
     71          }
     72          #bar-5 {
     73              top: 128px;
     74              left: 153px;
     75              width: 105px;
     76          }
     77         .triangle {
     78              position: absolute;
     79              width: 100px;
     80              height: 100px;
     81              background-color: lightblue;
     82              clip-path: polygon(0% 50%, 50% 100%, 0 100%);;
     83 
     84          }
     85          #triangle-1 {
     86              top: 90px;
     87              margin-left: 2px;
     88          }
     89          #triangle-2 {
     90              top: 120px;
     91              margin-left: 102px;
     92          }
     93      </style>
     94  </head>
     95  <body>
     96      <p>
     97          The test passes if one green bar is inside the top rectangle, four green bars
     98          are in the bottom rectangle, and none intersect the triangles. There should be no
     99          red.
    100      </p>
    101      <div id="test" class="container">
    102          <div class="test-float-left"></div>
    103          XXXXXXXXXXXXXXXXX
    104          <div class="test-float-left"></div>
    105          XXXXXXXXXXXXXXXXX
    106          XXXXXXXXXXXXXXX
    107          XXXXXXXXX
    108          XXXXXXX
    109      </div>
    110      <div id="margin-line"></div>
    111      <div id="failure-container">
    112          <div id="bar-1" class="fail"></div>
    113          <div id="bar-2" class="fail"></div>
    114          <div id="bar-3" class="fail"></div>
    115          <div id="bar-4" class="fail"></div>
    116          <div id="bar-5" class="fail"></div>
    117      </div>
    118      <div id="triangle-1" class="triangle"></div>
    119      <div id="triangle-2" class="triangle"></div>
    120  </body>
    121  </html>