Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow usage of icons for lists #370

Closed
xyeLz opened this issue Aug 4, 2022 · 2 comments
Closed

Allow usage of icons for lists #370

xyeLz opened this issue Aug 4, 2022 · 2 comments
Assignees
Labels
question Further information is requested
Milestone

Comments

@xyeLz
Copy link

xyeLz commented Aug 4, 2022

I was hoping it would be possible to use the ⭐ or :star-icon: emoji/icon as my bullet for lists instead of the built-in checkbox or dot.

@geoffreymcgill geoffreymcgill self-assigned this Aug 4, 2022
@geoffreymcgill geoffreymcgill added the question Further information is requested label Aug 4, 2022
@geoffreymcgill
Copy link
Collaborator

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 geoffreymcgill added this to the v3.3 milestone Aug 25, 2023
@geoffreymcgill
Copy link
Collaborator

Please see issue #603 and the following comment for several other samples on how to create icon lists, see

#603 (comment)

Hope this helps.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants