Skip to content

Instantly share code, notes, and snippets.

@pongo
Created May 31, 2025 19:17
Show Gist options
  • Save pongo/6bef8a72a8ab72ed4b2039447e2c5c33 to your computer and use it in GitHub Desktop.
Save pongo/6bef8a72a8ab72ed4b2039447e2c5c33 to your computer and use it in GitHub Desktop.
ol {
padding-inline-start: 0;
list-style: none;
counter-reset: my-counter;
display: grid;
grid-template-columns: auto 1fr;
row-gap: 0.5rem;
}
ol li {
display: contents;
}
ol li::before {
counter-increment: my-counter;
content: counter(my-counter) ".";
display: inline-block;
text-align: end;
padding-inline-end: 5px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment