Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: attr() in ::marker pseudo element</title>
<link rel="author" title="Swarup Ukil" href="mailto:sukil@mozilla.com">
<link rel="match" href="attr-pseudo-element-marker-ref.html">
<style>
li::marker { color: attr(data-color type(<color>), red); }
</style>
<ul><li id="special-bullet" data-color="yellow">Text</li></ul>
<script>
const bullet = document.getElementById("special-bullet");
bullet.getBoundingClientRect();
bullet.setAttribute("data-color", "green");
</script>