Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-cascade/scope-ua-shadow-host.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>@scope works with elements that have UA shadow roots</title>
<link rel="help" href="https://drafts.csswg.org/css-cascade-6/#scoped-styles">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<style>
input {
appearance: none;
border: none;
padding: 0;
margin: 0;
background-color: red;
}
@scope (.test) {
input {
width: 100px;
height: 100px;
background-color: green;
}
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div class="test">
<input>
</div>