xaringan
output is html so you can change any parts by css (e.g. using this guide to change bullet color to a red dot. Taking this as a template, you can add this chunk soon after the YAML of the Rmd to change it to a red bullet:
```{css, echo=F}
ul {
list-style: none; /* Remove default bullets */
}
ul li::before {
content: "\2022"; /* Add content: \2022 is the CSS Code/unicode for a bullet */
color: red; /* Change the color */
font-weight: bold; /* If you want it to be bold */
display: inline-block; /* Needed to add space between the bullet and the text */
width: 1em; /* Also needed for space (tweak if needed) */
margin-left: -1em; /* Also needed for space (tweak if needed) */
}
```
Separate style from content
Or more preferably (since it separates out the style component from slide content), create a css file, say style.css
which contains:
ul {
list-style: none; /* Remove default bullets */
}
ul li::before {
content: "\2022"; /* Add content: \2022 is the CSS Code/unicode for a bullet */
color: red; /* Change the color */
font-weight: bold; /* If you want it to be bold */
display: inline-block; /* Needed to add space between the bullet and the text */
width: 1em; /* Also needed for space (tweak if needed) */
margin-left: -1em; /* Also needed for space (tweak if needed) */
}
then add in the YAML, making sure that style.css is in the same path as your Rmd,
css: [xaringan-themer.css, style.css]
Tweaking the bullet shape
You can change the shape the bullet using a different unicode supplied in content
(e.g. use \2023
for a triangle bullet - see other common types here).
Changing the bullet color
You just need to replace red
with the color of your choice. You can replace it with the hex color code instead too.
- Another item` This doesn't work: `- One item
- Another item` – Leonardo Ribeiro May 29 '19 at 11:31