Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
            
- /css/css-pseudo/marker-display-dynamic-001.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Test: ::marker is created dynamically properly</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="match" href="marker-color-ref.html">
<style>
li {
  color: green;
  font-size: 40px;
  list-style-type: square;
}
::marker {
  display: none;
}
.tweak::marker {
  display: initial;
}
</style>
<ol>
    <li><!-- The list marker should be a green square.--></li>
</ol>
<script>
  onload = function() {
    let li = document.querySelector("li");
    li.offsetTop;
    li.classList.add("tweak");
  }
</script>