tor-browser

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

offset-path-url-009.html (1462B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>CSS Motion Path: offset-path:url() with padding-box</title>
      5    <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-url">
      6    <link rel="match" href="offset-path-url-008-ref.html">
      7    <meta name="assert" content="This tests that url() using padding-box
      8      generates a rotation and translation.">
      9    <style>
     10      #outer {
     11        width: 300px;
     12        height: 100px;
     13        padding: 50px;
     14        border: 50px solid black;
     15      }
     16      #target {
     17        position: relative;
     18        /**
     19         * offset-path:url() references to the svg element and treats coord-box
     20         * as its user coordinate system. And the svg element always gives it
     21         * the offset starting position (based on the svg attributes). So the
     22         * transformed box should ignore its current position from CSS layout.
     23         * Intentionally use left property to make sure we ignore it.
     24         */
     25        left: 100px;
     26        width: 50px;
     27        height: 50px;
     28        background-color: green;
     29        offset-path: url(#svgRect) padding-box;
     30        offset-distance: 0%;
     31        border-radius: 50% 50% 0 0;
     32      }
     33    </style>
     34  </head>
     35  <body>
     36    <div id="outer">
     37      <div id="target"></div>
     38    </div>
     39    <svg width="400" height="200" xmlns="http://www.w3.org/2000/svg">
     40      <defs>
     41        <rect id="svgRect" width="100" height="100" x="100" y="50"/>
     42      </defs>
     43    </svg>
     44  </body>
     45 </html>