Chrome / FF Search Results Highlight Styling

I have been researching this topic for a while now but could not find anything relevant.

Is there a way to override the default styles in Chrome / FF for the highlighted search results ? By that I mean the search results you obtain by doing cmd / ctrl + f and typing a search term.

The default style is yellow / orange for Chrome, and green for FF.

I tried using the ::selection pseudo selector, but this can only style text that is manually highlighted by the end user.

Thanks!

Upvotes: 2

Views: 344

Answers (1)

Jon
Jon

Reputation: 2671

From my understanding, this isn't something that you can change for users of the site, but you can can definitely change it for yourself in Firefox, but I am a bit unsure about Chrome.

You just have to type in about:config in the address bar. From there, if it isn't already in the list, add the property ui.textSelectBackgroundAttention and then add whatever color you want ad the value.

The following answer gives more properties to add. https://stackoverflow.com/a/11593406/2236808

Upvotes: 1

Related Questions