Change colour of number list (not bullets)

I’ve searched the WF forums but can’t find an answer for styling numbers inside a rich text list. I can use custom code to style standard bullets fine, but can’t find a method for styling number lists.

All I want to do is make the numbers in this list navy and bold. Any ideas please?! If it makes any difference, this will also be an RTF that’s connected to a Collection.


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

hi @ConnectCreativeDes the simples way is just use pseudo class ::marker

li::marker{
  color: red;
}

CleanShot 2022-04-21 at 13.23.44

Hi Stan, many thanks for the reply, this works great! I also had another reply on a different forum with slightly different code, that ignores the bullets, but only adjusts the numbers. Pasting it here if it’s any use to anyone else:

<style>
ol {
list-style: none; counter-reset: li
}
ol li::before {
content: counter(li); color: #293172;
font-weight: bold;
display: inline-block;
width: 1em;
margin-left: -1em
}
ol li {
counter-increment: li;
}
</style>

hi @ConnectCreativeDes you didn’t mention in your request that you don’t want to change color on bullets and as you have mentioned that you are able apply custom code I have posted only simple example as an hint.

You can use CSS specificity to achieve your goals with only adding ol before li::marker that is IMO more elegant and easy solution.

CleanShot 2022-04-21 at 13.45.49

I personally prefer use as less code as I can and still keep code easy to understand.

Anyway I’m glad to see you have found your solution as there is always many ways how to solve one problem and this issue can be solved even with javascript if you would like to. :wink:

Maybe someone will find this solution helpful too.