This snippet to differentiate search highlighting vs normal highlighting no longer works

Continuing the discussion from Differentiate search result vs. highlight color:

Any ideas on how to get the snippet to work again?
Thanks!

Does it work without the ‘cm-s’? See link below.

First thought is that your theme is interfering, try disabling that or removing it completely. Could also be some other third party css effect. Start in safe mode and add one plugin at a time.

No, it doesn’t work without the cm-s either. And I played around with other snippets and plugins, didn’t change anything.

I’ve seen that after the last release with the Updated CodeMirror 5 my proposed snippet to differentiate search & normal highlighting doesn’t work anymore…

I’ve tried a bunch of stuff, but it seems that it is working right from the box without adding any snippet! I just removed my rule for .obsidian-search-match-highlight

This is a screenshot from the Help vault without adding any snippets.

1 Like

Hm, thanks. Perhaps it has to do with the theme I’m using?. I use it because it interprets highlight colors differently, depending on whether the text is also bold or italics, so maybe that is messing with the search highlight color?

I’ve checked the code in shimmering-focus/obsidian.css at main · chrisgrieser/shimmering-focus · GitHub and found this:
image

So the odds are that the theme could be the reason. That particular rule is similar to the one I had proposed and now I’ve removed from my snippets.

Check it with the maintainer of the theme. Try creating an issue in his Github repo…

Thanks, I’ll do that :slight_smile:

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