tor-browser

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

svg-inline-styles-004.html (1646B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4    <title>CSS Test: Inline transform style on SVG group element and presentation attribute style on group and child elements</title>
      5    <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com">
      6    <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform">
      7    <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity">
      8    <link rel="match" href="reference/svg-inline-styles-ref.html">
      9    <meta name="flags" content="svg">
     10    <meta name="assert" content="Inline styles on SVG group elements override presentation attribute styles on the same element. Presentation attribute styles on child elements should be post-multiplied. The rect in the test should be rotated by 90 degrees clockwise and moved up 100 pixels and not scaled.">
     11    <style type="text/css">
     12    svg {
     13        height: 300px;
     14        width: 300px;
     15    }
     16    </style>
     17 </head>
     18 <body>
     19    <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p>
     20    <svg>
     21        <!-- Fill with Gradient to avoid false positive. -->
     22        <defs>
     23            <linearGradient id="grad" x2="0%" y2="100%">
     24                <stop offset="50%" stop-color="yellow"/>
     25                <stop offset="50%" stop-color="green"/>
     26            </linearGradient>
     27        </defs>
     28        <rect x="1" y="1" width="98" height="98" fill="red"/>
     29        <g style="transform: rotate(90deg)" transform="scale(0.5)">
     30            <rect width="100" height="100" fill="url(#grad)" transform="translate(0 -100)"/>
     31        </g>
     32    </svg>
     33 </body>
     34 </html>