tor-browser

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

shape-outside-box-009.html (2180B)


      1 <!DOCTYPE html>
      2 <html>
      3    <head>
      4        <title>CSS Test: right float, shape-outside: border-box</title>
      5        <link rel="author" title="Brad Werth" href="mailto:bwerth@mozilla.com">
      6        <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shapes-from-box-values">
      7        <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#border-box">
      8        <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property">
      9        <link rel="match" href="reference/shape-outside-box-005-ref.html">
     10        <meta name="flags" content="ahem" />
     11        <meta name="assert" content="The test verifies that text wraps around a
     12                                     right float with a shape-outside defined as
     13                                     the border box, with negative margins.
     14                                     The float area is clipped to the margin box.">
     15    </head>
     16    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     17    <style>
     18    body {
     19        margin: 0;
     20    }
     21    #container {
     22        position: relative;
     23    }
     24    #test-container {
     25        font: 40px/1 Ahem, sans-serif;
     26        text-align: right;
     27        width: 250px;
     28        height: 200px;
     29        color: green;
     30    }
     31    #test-shape {
     32        float: right;
     33        width: 150px;
     34        height: 150px;
     35        margin: -20px;
     36        padding: 10px;
     37        border: 10px solid transparent;
     38        shape-outside: border-box;
     39    }
     40    #line {
     41        position: absolute;
     42        top: 0px;
     43        left: 100px;
     44        width: 2px;
     45        height: 200px;
     46        border-left: 2px solid blue;
     47    }
     48    #failure {
     49        position: absolute;
     50        top: 80px;
     51        left: 60px;
     52        width: 40px;
     53        height: 40px;
     54        background-color: red;
     55        z-index: -1;
     56    }
     57    </style>
     58    <body>
     59    <p>The test passes if there is a green square to the left of the blue line. There should be no red.</p>
     60    <div id="container">
     61        <div id="test-container">
     62            <div id="test-shape"></div>
     63            <br/>
     64            <br/>
     65            X
     66        </div>
     67        <div id="line"></div>
     68        <div id="failure"></div>
     69    </div>
     70    </body>
     71 </html>