How to apply css snippets to a folder or tag?

I want to change the colour of the internal link. I have this .markdown-preview-view a.internal-link{ color: #5E8C6E !important; } . Works fine but I want it to only apply to notes within a certain folder or have a certain tag. Any way to do this?

Have you tried the property cssclasses?

1 Like

It’s a bit older, but you could try:

1 Like

Are you specifically wanting to change only Reading view internal link colors? What you have above won’t change anything in the editor (Source mode and Live Preview).


To change all reading views, I reccommend using the custom variables when and if possible.

e.g., as suggested by harr a cssclass of link-color1 (this can be mostly anything as long as it’s not used elsewhere) and the CSS:

.link-color1 { 
    --link-color: #5E8C6E; 
    --link-color-hover: #5E8C6E66;
}

Obsidian_8vAh8rKQis

1 Like

Thank you, that’s what I was looking for

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