I’m using Pandoc Markdown, which allows Makrdown to nest inside of HTML tags. I want to get ordered lists with circled numbers as follows:
<ol>
<li style="list-style-type: '❶ '">
First item
</li>
<li style="list-style-type: '❷ '">
Second item
</li>
</ol>
But instead I want to write them in markdown, and a CSS class to handle the rest:
<div class="circled-numbers">
1. First item
2. Second item
</div>
- It’s ok for this to work only up to 9 items.
- This needs to work in Safari.
- Accessibility is important.
- Need to customize circled numbers fonts without affecting the font of the list items.
Note, for the above Markdown snippet, Pandoc will generate:
<div class="circled-numbers">
<ol>
<li>
First item
</li>
<li>
Second item
</li>
</ol>
</div>
2
Answers
I got the following working.
You can define your own list styles:
https://developer.mozilla.org/en-US/docs/Web/CSS/@counter-style