Things I have tried
I search internet, this forum and also all .css of minimal theme that I currently use. I didn’t find style name of this code block.
What I’m trying to do
I am trying to change color of text in this block. By default it is red, I want to make it different color.
Thank you in advance
1 Like
Walrux
2
Add a CSS snippet with the following CSS. Change the color value according to your requirements
.cm-s-obsidian .HyperMD-codeblock {
color: yellow;
}
If this doesn’t work try adding “!important” after the color value.
Edit: @volkovics I am sorry because the above is not for inline code. However, the following is!
.cm-s-obsidian span.cm-inline-code {
color: yellow;
}
4 Likes
Very good, thank you very much, but there is problem. It works only in “edit mode”, when I open “preview mode” it doesn’t work.
1 Like
Walrux
4
.markdown-preview-view code{
color: yellow;
}
But this will select both inline code as well as code block.
5 Likes
It works fine for me. Thank you for help!
system
Closed
6
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.