diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2017-10-13 12:10:03 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2017-10-13 12:10:03 +0000 |
| commit | 8fcafa5b89139302eb7cb7433dacfc804ae77d9a (patch) | |
| tree | ae58544a709fa5f8be463cd75390c877c39a7064 | |
| parent | Implement !important rule handling for inline-style. Work from Jabier. (diff) | |
| download | inkscape-8fcafa5b89139302eb7cb7433dacfc804ae77d9a.tar.gz inkscape-8fcafa5b89139302eb7cb7433dacfc804ae77d9a.zip | |
Add test file for previous commit (!important rule for inline-style).
| -rw-r--r-- | testfiles/rendering_tests/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | testfiles/rendering_tests/expected_rendering/selector-important-003-large.png | bin | 0 -> 11308 bytes | |||
| -rw-r--r-- | testfiles/rendering_tests/expected_rendering/selector-important-003.png | bin | 0 -> 925 bytes | |||
| -rw-r--r-- | testfiles/rendering_tests/selector-important-003.svg | 57 |
4 files changed, 58 insertions, 0 deletions
diff --git a/testfiles/rendering_tests/CMakeLists.txt b/testfiles/rendering_tests/CMakeLists.txt index 361ab45a4..8db01d97a 100644 --- a/testfiles/rendering_tests/CMakeLists.txt +++ b/testfiles/rendering_tests/CMakeLists.txt @@ -5,6 +5,7 @@ set(RENDERING_TESTS test-glyph-y-pos test-rtl-vertical selector-important-002 + selector-important-003 ) diff --git a/testfiles/rendering_tests/expected_rendering/selector-important-003-large.png b/testfiles/rendering_tests/expected_rendering/selector-important-003-large.png Binary files differnew file mode 100644 index 000000000..91cb3afa9 --- /dev/null +++ b/testfiles/rendering_tests/expected_rendering/selector-important-003-large.png diff --git a/testfiles/rendering_tests/expected_rendering/selector-important-003.png b/testfiles/rendering_tests/expected_rendering/selector-important-003.png Binary files differnew file mode 100644 index 000000000..dfe3dbc5a --- /dev/null +++ b/testfiles/rendering_tests/expected_rendering/selector-important-003.png diff --git a/testfiles/rendering_tests/selector-important-003.svg b/testfiles/rendering_tests/selector-important-003.svg new file mode 100644 index 000000000..831319f5c --- /dev/null +++ b/testfiles/rendering_tests/selector-important-003.svg @@ -0,0 +1,57 @@ +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + width="480" height="360"> + + <title>Style "!important" — 003</title> + + <style type="text/css"> + + /* !important is not inherited. */ + g #groupA { fill: red !important; } + use { fill: blue; } + + /* Attributes cannot have !important. */ + #MyRectB { fill: blue; } + + /* Inline can have !important. */ + #MyRectC { fill: red !important; } + + /* Bad property shouldn't set !important. */ + #MyRectD { fill: XXX !important; } + + /* Bad inline property shouldn't set !important. */ + #MyRectE { fill: blue; } + </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" — 003</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" fill="red !important"/> + </g> + + <g id="groupC"> + <use id="MyRectC" class="classC" x="220" y="100" xlink:href="#MyRect" style="fill: blue !important"/> + </g> + + <g id="groupD"> + <use id="MyRectD" class="classD" x="320" y="100" xlink:href="#MyRect" style="fill: blue"/> + </g> + + <g id="groupE"> + <use id="MyRectE" class="classE" x="420" y="100" xlink:href="#MyRect" style="fill: XXX !important"/> + </g> + +</svg> |
