mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180. - Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
36 lines
No EOL
1.3 KiB
HTML
36 lines
No EOL
1.3 KiB
HTML
<!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>
|
|
<meta charset="utf-8" />
|
|
<title>CSS Test: :focus-within selector</title>
|
|
<link href="mailto:ethlin@mozilla.com" rel="author" title="Ethan Lin" />
|
|
<link href="https://www.mozilla.org" rel="author" title="Mozilla" />
|
|
<link href="https://drafts.csswg.org/selectors-4/#focus-within-pseudo" rel="help" />
|
|
<meta content="Test checks :focus-within should not apply after element removed." name="assert" />
|
|
<link href="reference/focus-within-2-ref.xht" rel="match" />
|
|
<meta content="interact" name="flags" />
|
|
<style type="text/css">
|
|
div {
|
|
border: solid 15px green;
|
|
outline: none;
|
|
}
|
|
div:focus-within {
|
|
border-color: red;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p>Test passes if, when the element is focused and then removed, the outer element should change to green.</p>
|
|
<div id="parent">
|
|
<div id="child" tabindex="1"></div>
|
|
</div>
|
|
<script>
|
|
var child = document.getElementById('child');
|
|
child.focus();
|
|
document.body.offsetWidth;
|
|
var parent = document.getElementById("parent");
|
|
parent.removeChild(child);
|
|
document.body.offsetWidth;
|
|
</script>
|
|
|
|
|
|
</body></html> |