I can't get CSS snippets working

Things I have tried

After following all the helpful advice from How to Install CSS snippets , my snippet is still not showing up.

What I’m trying to do

Snippet file in vault/.obsidian/snippets/edit-mode.css contains only one line:

span.cm-formatting-link { color: #999; }

I’ve set the snippet “on” in Setting → Appearance : CSS snippets

And yet, when I’m inspecting the DOM after restarting Obsidian, it’s still the same as it was in the Default:

Solved the issue:

  1. Everything is in the right place.
  2. @sailKite on the Discord server sent me in the right direction: it’s a specificity issue.

The proper CSS should be:

.cm-s-obsidian span.cm-formatting-link { color: #999; }

i.e., .cm-s-obsidian class was creating the higher specificity, as it should.

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