| 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="CM" author="Microsoft" status="reviewed" |
| 13 |
version="$Revision: 1.2 $" testname="$RCSfile: styling-pres-04-f.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/styling.html#UsingPresentationAttributes"> |
| 15 |
<p> |
| 16 |
Presentation attributes have lower priority than other CSS style rules specified in an internal style sheet. |
| 17 |
</p> |
| 18 |
</d:testDescription> |
| 19 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 20 |
<p> |
| 21 |
For each of a representative sampling of selectors, specify a 'fill: green' style rule for it, and add a corresponding |
| 22 |
element with 'fill=red' presentation attribute to the markup. Verify there is no red on the page. |
| 23 |
</p> |
| 24 |
</d:operatorScript> |
| 25 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 26 |
<p> |
| 27 |
Test passes if there is no red visible on the page. |
| 28 |
</p> |
| 29 |
</d:passCriteria> |
| 30 |
</d:SVGTestCase> |
| 31 |
<title id="test-title">$RCSfile: styling-pres-04-f.svg,v $</title> |
| 32 |
<defs> |
| 33 |
<font-face |
| 34 |
font-family="SVGFreeSansASCII" |
| 35 |
unicode-range="U+0-7F"> |
| 36 |
<font-face-src> |
| 37 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 38 |
</font-face-src> |
| 39 |
</font-face> |
| 40 |
</defs> |
| 41 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 42 |
|
| 43 |
<style type="text/css"><![CDATA[ |
| 44 |
path |
| 45 |
{ |
| 46 |
fill: green; |
| 47 |
} |
| 48 |
g svg circle |
| 49 |
{ |
| 50 |
fill: green; |
| 51 |
} |
| 52 |
g > ellipse |
| 53 |
{ |
| 54 |
fill: green; |
| 55 |
} |
| 56 |
ellipse + circle |
| 57 |
{ |
| 58 |
fill: green; |
| 59 |
} |
| 60 |
[id=testAttributeSelector] |
| 61 |
{ |
| 62 |
fill: green; |
| 63 |
} |
| 64 |
#testIdSelector |
| 65 |
{ |
| 66 |
fill: green; |
| 67 |
} |
| 68 |
#testPseudoClassSelector:first-child |
| 69 |
{ |
| 70 |
fill: green; |
| 71 |
}]]> |
| 72 |
</style> |
| 73 |
|
| 74 |
<path id="testTypeSelector" d="M 50 125 L 150 125 L 100 75 z" fill="red" /> |
| 75 |
<g> |
| 76 |
<svg> |
| 77 |
<circle id="testDescendantSelector" cx="50" cy="175" r="25" fill="red" /> |
| 78 |
</svg> |
| 79 |
</g> |
| 80 |
<g id="testParentContainer"> |
| 81 |
<ellipse id="testChildSelector" cx="160" cy="200" rx="25" ry="45" fill="red" /> |
| 82 |
<circle id="testAdjacentSiblingSelector" cx="100" cy="300" r="40" fill="red" /> |
| 83 |
</g> |
| 84 |
<circle id="testAttributeSelector" cx="300" cy="80" r="35" fill="red" /> |
| 85 |
<circle id="testIdSelector" cx="400" cy="140" r="50" fill="red" /> |
| 86 |
<g> |
| 87 |
<rect id="testPseudoClassSelector" x="270" y="240" width="150" height="80" fill="red" /> |
| 88 |
</g> |
| 89 |
|
| 90 |
</g> |
| 91 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 92 |
<text id="revision" x="10" y="340" stroke="none" |
| 93 |
fill="black">$Revision: 1.2 $</text> |
| 94 |
</g> |
| 95 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 96 |
<!-- comment out this watermark once the test is approved --> |
| 97 |
<g id="draft-watermark"> |
| 98 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 99 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 100 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 101 |
</g> |
| 102 |
</svg> |