JSFiddle - React, Tailwind, and code Playground

by Perry Kaufman

HTML

<p>
  Please read the following:
</p>
<div class="container">
  <ol class="container-list">
    <li>Item one.</li>
    <li>Item two.</li>
    <li>Item three.</li>
  </ol>
</div>

CSS

body {
  background-color: white;
  font-family: sans-serif;
}

p {
  margin: 5px 0px 5px 0px;
}

.container {
  position: relative;
  background-color: #e0e0eb;
  min-height: 19px;
  width: 500px;
  padding: 19px 5px 5px 5px;
}

.container::before {
  font-size: 12px;
  font-weight: 600;
  color: #737373;
  position: absolute;
  content: "List";
  padding: 5px 10px 0px 0px;
  top: 0;
  right: 0;
}

.container-list {
  list-style-type: none;
  margin: 0;
  padding: 0px 0px 0px 15px;
  counter-reset: item;
}

.container-list li {
  margin: 0;
}

.container-list li::before {
  content: counter(item) ". ";
  counter-increment: item;
  font-weight: 700;
  color: #4d0099;
}