Styling ::search-text and Other Highlight-y Pseudo-Elements

AI Summary1 min read

TL;DR

Chrome 144 introduces the ::search-text pseudo-element for styling find-in-page highlights, alongside other highlight-related pseudo-elements. This article explains how to use it and was originally published on CSS-Tricks.

Tags

Articlespseudo elements

The new ::search-text pseudo (Chrome 144) matches are yellow while the current target (::search-text:current) is orange, but ::search-text enables us to change that.


Styling ::search-text and Other Highlight-y Pseudo-Elements originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Visit Website