← Back to release summary

CSS Custom Highlight Universal Selector ::highlight(*)

Category
CSS
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Introduces a universal selector for custom highlights, ::highlight(*), which matches the highlight pseudo-elements of all custom highlights regardless of their name. The * argument contributes zero specificity, so its declarations act as a base style that rules naming a specific highlight override through the cascade.

Motivation

Styling shared properties across custom highlights requires repeating the same declarations for every registered name. The CSSWG resolved to allow ::highlight(*).

Standards & signals

Ecosystem

View on chromestatus.com