Here\'s the problem:
I have an ol li
ordered list with a start
attribute like so:
li tag have no access to parent attribute.
This is the best way i saw, using content: attr()
.custom {
margin: 0;
padding: 0;
list-style-type: none;
}
.custom li {
counter-increment: step-counter;
margin-bottom: 10px;
}
.custom li::before {
content: attr(data-idx);
margin-right: 5px;
font-size: 80%;
background-color: rgb(0,200,200);
color: white;
font-weight: bold;
padding: 3px 8px;
border-radius: 3px;
}
- This is the sixth item
- This is the seventh item
- This is the eighth item
- This is the ninth item
- This is the tenth item