summaryrefslogtreecommitdiffstats
path: root/testfiles/rendering_tests
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-10-11 15:52:17 +0000
committerTavmjong Bah <tavmjong@free.fr>2017-10-11 15:52:17 +0000
commit2b1f55d53447df339c09a693afd6a1c7adf402ba (patch)
treee128f56476b9e96958d5098f81d0c38b370c7d18 /testfiles/rendering_tests
parentAllow one !important rule to override another if later and has equal or highe... (diff)
downloadinkscape-2b1f55d53447df339c09a693afd6a1c7adf402ba.tar.gz
inkscape-2b1f55d53447df339c09a693afd6a1c7adf402ba.zip
Add test file for previous commit (!important rule).
Diffstat (limited to 'testfiles/rendering_tests')
-rw-r--r--testfiles/rendering_tests/CMakeLists.txt1
-rw-r--r--testfiles/rendering_tests/expected_rendering/selector-important-002-large.pngbin0 -> 11306 bytes
-rw-r--r--testfiles/rendering_tests/expected_rendering/selector-important-002.pngbin0 -> 921 bytes
-rw-r--r--testfiles/rendering_tests/selector-important-002.svg58
4 files changed, 59 insertions, 0 deletions
diff --git a/testfiles/rendering_tests/CMakeLists.txt b/testfiles/rendering_tests/CMakeLists.txt
index 8b77927a0..361ab45a4 100644
--- a/testfiles/rendering_tests/CMakeLists.txt
+++ b/testfiles/rendering_tests/CMakeLists.txt
@@ -4,6 +4,7 @@ set(RENDERING_TESTS
test-empty
test-glyph-y-pos
test-rtl-vertical
+ selector-important-002
)
diff --git a/testfiles/rendering_tests/expected_rendering/selector-important-002-large.png b/testfiles/rendering_tests/expected_rendering/selector-important-002-large.png
new file mode 100644
index 000000000..e92eef0a4
--- /dev/null
+++ b/testfiles/rendering_tests/expected_rendering/selector-important-002-large.png
Binary files differ
diff --git a/testfiles/rendering_tests/expected_rendering/selector-important-002.png b/testfiles/rendering_tests/expected_rendering/selector-important-002.png
new file mode 100644
index 000000000..b0af9bd12
--- /dev/null
+++ b/testfiles/rendering_tests/expected_rendering/selector-important-002.png
Binary files differ
diff --git a/testfiles/rendering_tests/selector-important-002.svg b/testfiles/rendering_tests/selector-important-002.svg
new file mode 100644
index 000000000..e5a66b68e
--- /dev/null
+++ b/testfiles/rendering_tests/selector-important-002.svg
@@ -0,0 +1,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>