ELSEIF
Your brief EB
379 stories from 115 feeds 431 clusters Refreshed 3 minutes ago next pull 01:22

WEB Signal 501

CSSWG adds .prefix-* selector to Selectors Level 5 spec

The CSS Selectors Level 5 specification now includes a .prefix-* selector that targets all classes with a hyphenated prefix, simplifying styling of prefixed class groups without attribute selectors or extra base classes.

WHY IT MATTERS

This selector removes the need for brittle attribute selectors or extra base classes when styling prefixed utility classes in design systems. However, since it only exists in spec text and has no browser support yet, it will be years before it can be used in production.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

The Class Prefix Selector (.prefix-*) was resolved at the CSSWG F2F meeting in Berlin in August 2026 and added to the CSS Selectors Level 5 spec.

02

The selector only matches hyphen-separated prefixes with at least one character after the prefix, and does not match empty or double-hyphen cases.

03

No browser support exists yet, and feature detection is possible with @supports selector(.foo-*).

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
bram.us via Hacker News The Future of CSS: Target Multiple Classes with the Class Prefix Selector Open ↗