Dev Helpers
← Back

Colour list markers separately from their text

Colour list markers separately from their text with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo {
    list-style-type: square;
    padding-inline-start: 2rem;
  }
  .demo li::marker {
    color: #0f766e;
  }
</style>
<ul class="demo">
  <li>Plan</li>
  <li>Build</li>
  <li>Verify</li>
</ul>