struct-use-10-f-isvalid.html (4374B)
1 <!DOCTYPE html> 2 <html lang='en'> 3 <head> 4 <title>struct-use-10-f-manual.svg</title> 5 <meta charset='utf-8'> 6 </head> 7 <body> 8 <h1>Source SVG: struct-use-10-f-manual.svg</h1> 9 <svg version="1.1" baseProfile="full" id="svg-root" 10 width="100%" height="100%" viewBox="0 0 480 360" 11 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 12 <!--======================================================================--> 13 <!--= SVG 1.1 2nd Edition Test Case =--> 14 <!--======================================================================--> 15 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =--> 16 <!--= Institute of Technology, European Research Consortium for =--> 17 <!--= Informatics and Mathematics (ERCIM), Keio University). =--> 18 <!--= All Rights Reserved. =--> 19 <!--= See http://www.w3.org/Consortium/Legal/. =--> 20 <!--======================================================================--> 21 22 <title id="test-title">$RCSfile: struct-use-10-f.svg,v $</title> 23 <defs> 24 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> 25 <font-face-src> 26 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> 27 </font-face-src> 28 </font-face> 29 </defs> 30 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> 31 <style> 32 33 /* low specificity */ 34 defs > rect { 35 fill:red; 36 } 37 38 /* applies because of higher specificity */ 39 .testclass1 { 40 fill:green; 41 } 42 43 /* does not apply because selectors don't apply to the (conceptually) cloned subtree */ 44 #testid1 .testclass1 { 45 fill: red; 46 } 47 48 /* does not apply because of case sensitivity of class value */ 49 g .testClass1 { 50 fill:red; 51 } 52 53 /* does not apply because of lower specificity */ 54 #g1 .testclass2 55 { 56 fill: red 57 } 58 59 /* does not apply to the used rect, because there is no inheritance from the original tree into the used subtree */ 60 g#g1 { 61 visibility: hidden 62 } 63 64 /* applies because of higher specificity */ 65 #testid2 { 66 stroke:darkgreen; 67 } 68 69 /* no effect for the used rect, can be referenced anyway into the used subtree */ 70 g#g2 { 71 display: none; 72 } 73 74 /* applies directly to the original (referenced) rect element */ 75 .testclass3 > rect { 76 fill: green; 77 stroke:darkgreen; 78 } 79 80 /* does not apply to the used rect, because there is no direct access with selectors into the used subtree */ 81 #testid3 rect { 82 stroke:red; 83 } 84 #testid3 rect#testrect3 { 85 fill:red; 86 } 87 </style> 88 89 <defs> 90 <rect id="testrect1" class="testclass1" width="100" height="100"/> 91 <g id="g1" style="fill:red"> 92 <rect id="testrect2" class="testclass2" width="100" height="100" style="fill:green"/> 93 </g> 94 <g id="g2" class="class testclass3 g"> 95 <rect id="testrect3" width="100" height="100" stroke="red"/> 96 </g> 97 </defs> 98 99 <text x="50%" y="3em" style="text-anchor:middle; fill:black">CSS selectors and use element</text> 100 101 <circle class="indicator" cx="240" cy="150" r="25" fill="red"/> 102 <circle class="indicator" cx="390" cy="150" r="25" fill="red"/> 103 104 <use id="testid1" xlink:href="#testrect1" x="40" y="100" style="stroke:darkgreen" stroke-width="10"/> 105 <use id="testid2" xlink:href="#testrect2" x="190" y="100" stroke="red" stroke-width="10"/> 106 <use id="testid3" xlink:href="#testrect3" x="340" y="100" style="stroke:red" stroke-width="10"/> 107 108 </g> 109 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> 110 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> 111 </g> 112 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> 113 <!-- comment out this watermark once the test is approved --> 114 <!--<g id="draft-watermark"> 115 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> 116 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" 117 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> 118 </g>--> 119 </svg> 120 </body> 121 </html>