<ol>
  <li>List item</li>
  <li>List item<ol>
    <li>List item</li>
    <li>List item</li>
  </ol></li>
  <li>List item</li>
  <li>List item<ol>
    <li>List item</li>
    <li>List item<ol>
      <li>List item</li>
      <li>List item</li>
    </ol></li>
    <li>List item</li>
    <li>List item</li>
  </ol></li>
</ol>
ol {
  list-style: none;
  counter-reset: my-awesome-counter;
}
li {
  counter-increment: my-awesome-counter;
  margin: 0.25rem;
}
li::before {
  content: counter(my-awesome-counter);
  background: #662974;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-block;
  line-height: 2rem;
  color: white;
  text-align: center;
  margin-right: 0.5rem;
}
ol ol li::before {
  background: #DE51FF;
}
ol ol ol li::before {
  background: #EE9EFF;
}

body {
  font-family: 'PT Serif', serif;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.