<div class="list-container">
  <h1>Customizing styles for ordered list</h1>
  <ol>
    <li>
      One
      <ol>
        <li>One one</li>
      </ol>
    </li>
  
    <li>
      Two
      <ol>
        <li>Two one</li>
      </ol>
    </li>
  
    <li>
      Three
      <ol>
        <li>
          Three one
          <ol>
            <li>Three one one</li>
          </ol>
        </li>
      </ol>
    </li>
</ol>
</div>
* {
  font-family: "Nunito", sans-serif;
}

.list-container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1 {
  color: #62727b;
  text-align: center;
}

ol {
  counter-reset: section;
  list-style-type: none;
  padding: 0;
  font-size: 1.2rem;
}

li {
  display: block;
  list-style: none;
  font-weight: bold;
  color: #62727b;
  padding: 10px 0px;
}

li:before {
  counter-increment: section;
  content: counters(section, ".") ". ";
  background-image: linear-gradient(
    90deg,
    #b8cbb8 0,
    #b8cbb8 0,
    #b465da 0,
    #cf6cc9 33%,
    #ee609c 66%,
    #ee609c
  );
  background-size: 100%;
  background-repeat: repeat;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-background-clip: text;
  -moz-text-fill-color: transparent;
  font-size: 1.5rem;
  font-weight: bold;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.