Highlight background in live preview mode

!-- Below this line, describe what you’re trying to accomplish so the community can help you find the best solution. →

I made a CSS snippet to change the ==highlight== background colour in live preview mode, but it only works in reading mode.

.markdown-preview-view mark {
background-color: #a1cbffa6;

What do I have to change to get it to work in live preview mode?

Things I have tried

I tried .markdown-source-view but that didn’t work either. I don’t know what the descriptor should be, and I don’t know where to find out, as I’m new to tinkering with CSS.

I found the answer on Discord. This works:

.cm-s-obsidian span.cm-formatting-highlight,.cm-s-obsidian span.cm-highlight {
background-color: #a1cbffa6;

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