JSFiddle - React, Tailwind, and code Playground
HTML
<ol class="steps">
<li class="step1 current"><span>Shipping</span></li>
<li class="step2"><span>Payment</span></li>
</ol>
SCSS
ol.steps {
$line_height: 20px;
$padding: 9px;
list-style: none;
margin: 0;
padding: 0;
overflow: hidden;
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', 'DejaVu Sans', 'Bitstream Vera Sans', 'Liberation Sans', Verdana, 'Verdana Ref', sans-serif;
font-size: 13px;
line-height: $line_height;
font-weight: bold;
counter-reset: li;
li {
list-style-image: none;
list-style-type: none;
margin-left: 0;
text-align: center;
color: #3a3a3a;
background: #dae4eb;
span {
display: block;
padding: $padding; // moved from LI element
// "X)" numbering
&:before {
content: counter(li) ") ";
counter-increment: li;
}
}
}
& > li {
float: left;
}
li.current {
color: #fff;
background: #7b7b7b;
}
}