-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Expand file tree
/
Copy pathcss3-modsel-159.xml
More file actions
22 lines (22 loc) · 1.01 KB
/
Copy pathcss3-modsel-159.xml
File metadata and controls
22 lines (22 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Syntax and parsing of new pseudo-elements</title>
<style type="text/css"><![CDATA[
::selection { background: lime; }
:selection { background: red; }
]]></style>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<p id="t1">Try selecting some text in this document. It should be have a green background.</p>
<script><![CDATA[
test(function() {
assert_equals(window.getComputedStyle(document.getElementById('t1'), '::selection').backgroundColor, 'rgb(0, 255, 0)', '::selection background should be lime');
}, 'Syntax and parsing of new pseudo-elements');
]]></script>
</body>
</html>