Color whole tag on hover

I have some problems coloring hastags on hover. In preview mode, it already works, but in editor mode, the # has a different class (.cm-s-obsidian span.cm-hashtag-begin) than the tag itself and is not colored on hover.

Things I have tried

The following works for hovering over the the tag name, but the # will not be colored on hover in editor mode:

.tag:hover,
.cm-s-obsidian span.cm-hashtag:hover
{
  color: var(--text-hashtag-hover);
}

What I’m trying to do

I want to color the whole tag including # when hovering over either the tag name or #.

2 Likes

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