Bullet point is not changing to the same color as the text

Hi,

I was wondering if it is possible to style the bullet point so the color depends on the text color?

I have used following in the CSS:

li {
margin: 35px 0;
color: #343434;
}

However, it does not quite solve my problem, hence we sometimes have a red coloured background with white text where the dark-grey bullet point is too difficult to see.

Does anyone know how I can fix it?

Thank you!

Hey @Camilla_02

Do you have a page where this not working? The code you provided should work.

Hi @dennisedson

Yes sure - here is a page where it is not working https://www.vitalsmarts.dk/-temporary-slug-2cbf3a41-3b96-4ae3-9d0d-4f7eda6de4a7?hs_preview=ZenVnkHV-41794828044

If you scroll down to “område 3” you can see that the text is white while the bullet points remain dark-grey.

@Camilla_02 ,

Thanks for sharing!

So if you take a look at the code, you will see that the text is being wrapped in a span. Example:

<li data-leveltext="-" data-font="Calibri" data-listid="1" aria-setsize="-1" data-aria-posinset="1" data-aria-level="1">
 <span style="color: #ffffff;">Påtale det, lige så snart du opdager det. Gør det faktabaseret, og motivér hvorfor du gør det. En motivation kunne være, at du gerne vil have at din stakeholder eller leder fremstår succesfuld. </span><span style="color: #ffffff;">
 </span>
</li>

So you will need to make sure that both li and the span are included. I am guessing that the span was edited in a rich text editor which is what added the spans and the inline css.

@Kevin-C and @jonchim could probably help out some more here :grinning_face:

Hey @Camilla_02,

I don’t think I’ve seen a way where the bullet inherits the list item’s color, you’ll have to probably give the list a custom class for any bullets that need to be white. Something like the below should do the trick.

.customListClass li::marker {
 color: #ffffff;
}

Thank you @dennisedson and @jonchim!