Css snippet to change the color of numbered lists

im trying to change the color of numbered lists collapsed and expanded. i dont want it to affect the bullet points just the number and the period that follows

Screenshot 2024-06-03 002601
this is what i have currently and i used this snippet:
body.theme-dark {
–list-marker-color: #68FF92;
–list-marker-color-collapsed: #68FF92;

here the bullet points are also green but i want then to be the default grey

As you can tell, the --list-marker-color variables are too broad here.

You could try this as it’s more specific. The first two lines are for Reading view, the second two lines are for the editor.

ol > li::marker,
ol > li.is-collapsed::marker,
.cm-s-obsidian .cm-formatting-list,
.cm-s-obsidian .is-collapsed ~ .cm-formatting-list {
    color: #68FF92;

thanks this worked perfectly. also if its not a bother is there any way to change the color of text in a circle bracket? eg:
i want both the cars and the brackets to be a different color. thanks again


For the future, if you have an unrelated request, it’s best to open a new topic.

CSS can’t select random text to style. You’ll need a community plugin for that. You could try Dynamic Highlights or Keyword Highlighter.

okay thankyou

Not individual words, but another member used Dynamic Highlights to target text in double parentheses:

Could be a starting point for what you are looking to do.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.