retype icon indicating copy to clipboard operation
retype copied to clipboard

Allow usage of icons for lists

Open xyeLz opened this issue 2 years ago • 1 comments

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.

xyeLz avatar Aug 04 '22 03:08 xyeLz

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
Screen Shot 2022-08-04 at 11 23 54 AM

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
Screen Shot 2022-08-04 at 11 24 15 AM

Hope this helps.

geoffreymcgill avatar Aug 04 '22 17:08 geoffreymcgill

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.

geoffreymcgill avatar Aug 25 '23 04:08 geoffreymcgill