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-rule-attr-with-colons.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>@scope with :: inside attribute selector values is valid</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style id="scope-attr-colons">
@scope ([data-x="::"]) { .a { color: red } }
</style>
<script>
"use strict";
test(() => {
const { sheet } = document.getElementById("scope-attr-colons");
assert_equals(sheet.cssRules.length, 1, "The @scope rule should not be dropped");
assert_equals(sheet.cssRules[0].constructor.name, "CSSScopeRule");
}, "@scope with :: in attribute value is not rejected as a pseudo-element");
</script>