]> gitweb.michael.orlitzky.com - libsvgtiny.git/blobdiff - test/css/link-pseudo-class.svg
test/css: add some visually-verified test cases for our new features
[libsvgtiny.git] / test / css / link-pseudo-class.svg
diff --git a/test/css/link-pseudo-class.svg b/test/css/link-pseudo-class.svg
new file mode 100644 (file)
index 0000000..d9b6edf
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+Test the node_is_link select handler via the :link pseudo-class. The
+result should be a blue document, because we treat all "a" elements
+with an "href" as links, but only case-sensitively (the HREF is
+ignored).
+-->
+<svg width="640"
+     height="480"
+     viewBox="0 0 640 480"
+     xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg">
+
+  <style>
+    :link {
+      fill-opacity: 0;
+    }
+  </style>
+
+  <a href="#">
+    <rect x="0"
+          y="0"
+          width="640"
+          height="480"
+          fill="red" />
+  </a>
+
+  <a HREF="#">
+    <rect x="0"
+          y="0"
+          width="640"
+          height="480"
+          fill="blue" />
+  </a>
+</svg>
+