retype
retype copied to clipboard
Allow usage of icons for lists
I was hoping it would be possible to use the :star: or :star-icon: emoji/icon as my bullet for lists instead of the built-in checkbox or dot.
This is possible using a little custom CSS.
<style>
ul.stars {
list-style: "⭐ ";
list-style-position: outside;
}
ul.stars ul li {
list-style-type: circle;
}
</style>
{ .stars }
- Item 1
- Item 2
- Item 3
The content of that <style> block could also be moved out of the page and included site wide by adding to the _includes/head.html file.
<!-- include this snippet into the file _includes/head.html -->
<style>
ul.stars {
list-style: "⭐ ";
list-style-position: outside;
}
ul.stars ul li {
list-style-type: circle;
}
</style>
The list syntax on the page would then just be the following:
{ .stars }
- Item 1
- Item 2
- Item 3
The above custom style could also be inlined, as the following sample demonstrates:
{ style="list-style: '⭐ ';list-style-position: outside; li { list-style-type: circle; } " }
- Item 1
- Item 2
- Item 3
Hope this helps.
Please see issue #603 and the following comment for several other samples on how to create icon lists, see
https://github.com/retypeapp/retype/issues/603#issuecomment-1692740146
Hope this helps.