How can I change the highlight colour when doing a search
Greetings everyone. I am currently using the default Obsidian theme (dark). Whenever I do a search, or click on a link to header, the returned result is highlighted with a dark yellow colour that I find visually unpleazing. (See screenshot)
It removes the background and gives the text your accent colour, which is what I prefer.
The snippet is for the global search, inline search queries & the backlinks pane, if you only want this to apply to the global search then just remove the other two selectors:
Text-highlight variable is used for highlights in editor as well. Editor can be targeted by replacing .search-result-container with .markdown-source-view. Reading mode can be targeted with .markdown-reading-view.