Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-lists/nested-marker-dynamic.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>::marker pseudo-elements generated by ::before and ::after are not addressable by selectors</title>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="match" href="nested-marker-ref.html">
<style>
li, ::marker {
color: red;
}
li::before, li::after {
display: list-item;
content: "Before";
}
li::after {
content: "After";
}
.tweak::marker {
color: blue;
}
.tweak, .tweak::before, .tweak::after {
color: initial;
}
</style>
<ol>
<li>Foo
<li>Bar
<script>
window.onload = function() {
document.body.offsetTop;
for (let li of document.querySelectorAll("li"))
li.classList.add("tweak");
}
</script>