Repository navigation
Expand file tree
/
Copy pathcss3-modsel-53.xml
More file actions
41 lines (41 loc) · 2.01 KB
/
Copy pathcss3-modsel-53.xml
File metadata and controls
41 lines (41 loc) · 2.01 KB
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
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NEGATED attribute dash-separated value selector</title>
<style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
@namespace b url(http://www.example.org/b);
div.stub p { color : red }
div.stub > a|*, div.stub > b|* { color : red ; display : block ; margin-bottom : 1em }
div.stub *|*:not([test|="foo-bar"]) { color : lime }
div.stub *|p:not([lang|="en-us"]) { color : lime }
div.stub b|*[test|="foo2-bar"] { color : lime }
]]></style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
<link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
<link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
<meta name="flags" content=" namespace" />
</head>
<body>
<div class="stub">
<q xmlns="http://www.example.org/a" test="foo-bar">
<r id="t1" test="foo-bartut">This text should be</r>
<r id="t2">in green characters</r>
</q>
<s xmlns="http://www.example.org/a" id="t3" test="bar tut">This text should be in green characters</s>
<t xmlns="http://www.example.org/a" id="t4">This text should be in green characters</t>
<p class="en-uk" id="t5">This text should be in green characters</p>
<u xmlns="http://www.example.org/b" id="t6" test="foo2-bar-lol">This text should be in green characters</u>
</div>
<script><![CDATA[
test(function() {
assert_equals(getComputedStyle(document.getElementById('t1')).color, LIME);
assert_equals(getComputedStyle(document.getElementById('t2')).color, LIME);
assert_equals(getComputedStyle(document.getElementById('t3')).color, LIME);
assert_equals(getComputedStyle(document.getElementById('t4')).color, LIME);
assert_equals(getComputedStyle(document.getElementById('t5')).color, LIME);
assert_equals(getComputedStyle(document.getElementById('t6')).color, LIME);
}, 'CSS3 Negated attribute dash-separated value selector');
]]></script>
</body>
</html>