CSS Classes applied to Notes

Things I have tried

I have tried to change the color by typing the notes in as code:

<h1 class="Topic" Heading 1

I have tried using the CSS that specifically targets headings, but I am unsure how to make it vary like I could with classes.

.cm-header-1{ color: blue; }

What I’m trying to do

I am trying to set up classes to change the color of headings depending on the scenario. For instance, I want to assign the class “topic” to h1, and for all text assigned the “topic” class is to be blue.

I would like to use a structure like this in my theme file

.cm-header-1 > .Topic { color: blue;}

Any help is appreciated

u can do this in your markdown

# <span class="topic">Header 1</span>
bla bla content <span class="topic">blue text</span> bla bla

## <span class="topic">Header 2</span>
bla bla content bla bla

your css should look like this

.topic {
    color: blue;
}
1 Like