← Back to release summary

CSS ::target-text pseudo-element

Category
CSS
Type
Chromium catches up
Status
Enabled by default (Chrome 89)
Intent stage
Shipped

Summary

A highlight pseudo element to allow authors to style scroll-to-text fragments different from the default UA highlighting.

Motivation

Authors should be able to style the highlighted text from scroll-to-text fragments to have the style match that of the rest of the page. See https://chromestatus.com/feature/4733392803332096 for the scroll-to-text feature.

Standards & signals

Explainers: https://drafts.csswg.org/css-pseudo/#selectordef-target-text

View on chromestatus.com