| 1 |
<svg id="svg-root" width="100%" height="100%" |
| 2 |
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" |
| 3 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =--> |
| 6 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 7 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 8 |
<!--= All Rights Reserved. =--> |
| 9 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 10 |
<!--======================================================================--> |
| 11 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 12 |
template-version="1.4" reviewer="ED" author="Microsoft" status="accepted" |
| 13 |
version="$Revision: 1.3 $" testname="$RCSfile: styling-css-08-f.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/styling.html#StylingWithCSS"> |
| 15 |
<p> |
| 16 |
Test that CSS styling via the 'style' element is supported. |
| 17 |
</p> |
| 18 |
<p> |
| 19 |
For each of a representative sampling of selectors, specify a 'visibility: hidden' style rule and add a corresponding red |
| 20 |
element to the markup. A reference in green is shown for each shape. |
| 21 |
</p> |
| 22 |
</d:testDescription> |
| 23 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 24 |
<p> |
| 25 |
Run the test. No interaction required. |
| 26 |
</p> |
| 27 |
</d:operatorScript> |
| 28 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 29 |
<p> |
| 30 |
The test is passed if there is no red visible on the page and there are seven green shapes visible. |
| 31 |
</p> |
| 32 |
</d:passCriteria> |
| 33 |
</d:SVGTestCase> |
| 34 |
<title id="test-title">$RCSfile: styling-css-08-f.svg,v $</title> |
| 35 |
<defs> |
| 36 |
<font-face |
| 37 |
font-family="SVGFreeSansASCII" |
| 38 |
unicode-range="U+0-7F"> |
| 39 |
<font-face-src> |
| 40 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 41 |
</font-face-src> |
| 42 |
</font-face> |
| 43 |
</defs> |
| 44 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 45 |
|
| 46 |
<style type="text/css"><![CDATA[ |
| 47 |
path |
| 48 |
{ |
| 49 |
visibility: hidden; |
| 50 |
} |
| 51 |
g svg circle |
| 52 |
{ |
| 53 |
visibility: hidden; |
| 54 |
} |
| 55 |
g > ellipse |
| 56 |
{ |
| 57 |
visibility: hidden; |
| 58 |
} |
| 59 |
ellipse + circle |
| 60 |
{ |
| 61 |
visibility: hidden; |
| 62 |
} |
| 63 |
[id=testAttributeSelector] |
| 64 |
{ |
| 65 |
visibility: hidden; |
| 66 |
} |
| 67 |
#testIdSelector |
| 68 |
{ |
| 69 |
visibility: hidden; |
| 70 |
} |
| 71 |
#testPseudoClassSelector:first-child |
| 72 |
{ |
| 73 |
visibility: hidden; |
| 74 |
} |
| 75 |
.reference { visibility: visible !important } |
| 76 |
]]> |
| 77 |
</style> |
| 78 |
|
| 79 |
<path class="reference" d="M 50 125 L 150 125 L 100 75 z" fill="lime" visibility="hidden"/> |
| 80 |
<path id="testTypeSelector" d="M 50 125 L 150 125 L 100 75 z" fill="red" /> |
| 81 |
<g> |
| 82 |
<svg width="200" height="200"> |
| 83 |
<circle class="reference" cx="50" cy="175" r="25" fill="lime" visibility="hidden"/> |
| 84 |
<circle id="testDescendantSelector" cx="50" cy="175" r="25" fill="red" /> |
| 85 |
</svg> |
| 86 |
</g> |
| 87 |
<g id="testParentContainer"> |
| 88 |
<ellipse class="reference" cx="160" cy="200" rx="25" ry="45" fill="lime" visibility="hidden"/> |
| 89 |
<circle class="reference" cx="100" cy="300" r="40" fill="lime" visibility="hidden"/> |
| 90 |
<ellipse id="testChildSelector" cx="160" cy="200" rx="25" ry="45" fill="red" /> |
| 91 |
<circle id="testAdjacentSiblingSelector" cx="100" cy="300" r="40" fill="red" /> |
| 92 |
</g> |
| 93 |
<circle class="reference" cx="300" cy="80" r="35" fill="lime" visibility="hidden"/> |
| 94 |
<circle id="testAttributeSelector" cx="300" cy="80" r="35" fill="red" /> |
| 95 |
|
| 96 |
<circle class="reference" cx="400" cy="140" r="50" fill="lime" visibility="hidden"/> |
| 97 |
<circle id="testIdSelector" cx="400" cy="140" r="50" fill="red" /> |
| 98 |
|
| 99 |
<rect class="reference" x="270" y="240" width="150" height="80" fill="lime" visibility="hidden"/> |
| 100 |
<g> |
| 101 |
<rect id="testPseudoClassSelector" x="270" y="240" width="150" height="80" fill="red" /> |
| 102 |
</g> |
| 103 |
|
| 104 |
</g> |
| 105 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 106 |
<text id="revision" x="10" y="340" stroke="none" |
| 107 |
fill="black">$Revision: 1.3 $</text> |
| 108 |
</g> |
| 109 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 110 |
<!-- comment out this watermark once the test is approved |
| 111 |
<g id="draft-watermark"> |
| 112 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 113 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 114 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 115 |
</g> --> |
| 116 |
</svg> |