Thomas Steiner, a web developer advocate at Google, said that soon you will be able to style a text fragment URL highlight on pages with the target-text pseudo class. So instead of the highlighted text being yellow, it can be blue, green, purple or whatever you like.
This is the feature where Google highlights your text on a page after you click from a featured snippet.
Here is his post on Twitter:
You'll soon be able to style a text fragment URL (https://t.co/WhCJhCpe4w) highlight on pages with the `::target-text` pseudo class (details: https://t.co/aH7udfG869).
— Thomas Steiner (@tomayac) October 15, 2020
```css
::target-text {
background-color: purple;
}
```
Now: #:~:text=foo → 🟨🟨
Soon: #:~:text=foo → 🟪🟪
Here is how it works, search for [adsense pop up ads]; one of the few features snippets I have left on this site and you get this:
Click on it and you will see it scrolls down to the portion of this content it used above and highlights it:
Note, that yellow might be a different color in the future, if I decide to stylize it.
Forum discussion at Twitter.