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-placeholder.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<title>@scope - ::placeholder</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="match" href="scope-placeholder-ref.html">
<style>
::placeholder {
color: red;
}
@scope (.foo) {
::placeholder {
color: green;
}
}
</style>
<div class="foo">
<input placeholder="static">
</div>
<div id="dynamic">
<input placeholder="dynamic">
</div>
<script src="/common/reftest-wait.js"></script>
<script>
document.documentElement.offsetTop;
requestAnimationFrame(() => requestAnimationFrame(() => {
document.getElementById("dynamic").classList.add("foo");
takeScreenshot();
}));
</script>
</html>