summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/selectors/sharing-in-svg-use.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/selectors/sharing-in-svg-use.html')
-rw-r--r--testing/web-platform/tests/css/selectors/sharing-in-svg-use.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/selectors/sharing-in-svg-use.html b/testing/web-platform/tests/css/selectors/sharing-in-svg-use.html
new file mode 100644
index 0000000000..08a038ca8b
--- /dev/null
+++ b/testing/web-platform/tests/css/selectors/sharing-in-svg-use.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<title>CSS Test: nth-of-type should work in an svg use subtree</title>
+<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1540385">
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="author" title="Mozilla" href="https://mozilla.org">
+<link rel="match" href="sharing-in-svg-use-ref.html">
+<style>
+rect:nth-of-type(1) {
+ fill: blue;
+}
+rect:nth-of-type(2) {
+ fill: purple;
+}
+</style>
+<!-- Should see two different colors -->
+<svg width="200" height="100">
+ <defs>
+ <g id="p0">
+ <rect width="100" height="100" />
+ <rect x="100" y="0" width="100" height="100" />
+ </g>
+ </defs>
+ <use href="#p0" x="0" y="0" />
+</svg>