blob: e5a66b68ecaaec52ad1a4599d7e8bc799b730518 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="480" height="360"
style="fill:orange !important">
<title>Style "!important" — 002</title>
<style type="text/css">
<!-- Later rule overrides same specificity previous rule. -->
#groupA use { fill: red !important; }
#groupA use { fill: blue !important; }
#groupB .classB { fill: red !important; }
#groupB .classB { fill: blue !important; }
#groupC #MyRectC { fill: red !important; }
#groupC #MyRectC { fill: blue !important; }
#groupD { fill: blue !important; }
#classD { fill: red !important; }
#groupE use { fill: blue !important; }
#groupE { fill: red !important; }
</style>
<defs>
<rect id="MyRect" width="40" height="40"/>
</defs>
<!--
<text id="title" x="240" y="50" style="fill:black; font-size:24px; text-anchor:middle;">Style "!important" — 002</text>
<a href="https://svgwg.org/svg2-draft/stylling.html">
<text id="source" x="240" y="70" style="fill:black; font-size:12px; text-anchor:middle;">https://svgwg.org/svg2-draft/styling.html</text>
</a>
-->
<g id="groupA">
<use id="MyRectA" class="classA" x="20" y="100" xlink:href="#MyRect" />
</g>
<g id="groupB">
<use id="MyRectB" class="classB" x="120" y="100" xlink:href="#MyRect" />
</g>
<g id="groupC">
<use id="MyRectC" class="classC" x="220" y="100" xlink:href="#MyRect" />
</g>
<g id="groupD">
<use id="MyRectD" class="classD" x="320" y="100" xlink:href="#MyRect" />
</g>
<g id="groupE">
<use id="MyRectE" class="classE" x="420" y="100" xlink:href="#MyRect" />
</g>
</svg>
|