tor-browser

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

clip-path-marginBox-1d.html (1252B)


      1 <!DOCTYPE html>
      2 <title>CSS Masking: clip path with margin-box and border-radius when the ratio of border-radius/margin is less than 1</title>
      3 <link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-clip-path">
      4 <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-box-margin-box">
      5 <link rel="match" href="clip-path-marginBox-1d-ref.html">
      6 <meta name="fuzzy" content="maxDifference=0-224; totalPixels=0-500">
      7 <meta name="assert" content="Check that the 'clip-path' property supports margin-box with border-radius.">
      8 
      9 <style>
     10  .clipped {
     11    width: 50px;
     12    height: 50px;
     13    background-color: green;
     14    clip-path: margin-box;
     15    border-radius: 10px;
     16    /* This outline draws far outside the margin box and should be partially clipped. */
     17    outline: 200px solid green;
     18    margin: 50px;
     19    /* Disables margin collapsing. */
     20    float: left;
     21  }
     22 </style>
     23 <!--
     24  Spec: If the ratio of border-radius/margin is less than 1, and margin is
     25        positive, then the margin box corner radius is
     26        border-radius + margin * (1 + (ratio-1)^3).
     27 
     28  This test has a border-radius of 10 and a margin of 50, and should use a
     29  margin box corner radius of: 10 + 50 * (1 + (10/50-1)^3) = 34.4
     30 -->
     31 <div class="clipped"></div>