TechQuiet 87d · day 87
CSS gets Class Prefix Selector for easier multi-class targeting
The CSS Working Group resolves to add .prefix-* syntax, letting developers style groups of related classes without brittle attribute selectors.
What to know
- The CSS Working Group approved a new .prefix-* selector syntax in August 2026 to target multiple classes sharing a hyphen-separated prefix in a single rule.
- The feature addresses a common problem in utility-based design systems where developers previously had to either list classes individually or use brittle attribute selectors.
- The selector is currently spec-only with no browser implementation; the specification will likely see changes before browsers adopt it.
- The syntax only matches classes with at least one character beyond the prefix, excluding edge cases like .foo- or .foo--.
“It's a huge win for utility classes and design systems, allowing you to easily target groups of related elements without having to bloat your HTML payload or write fragile attribute selectors.”
Bramus, Technical writer · bram.us blog post · Aug 19
Lea Verou CSS proposal originatorBramus Front-end developer and technical writerCSS Working Group Standards body
The record 2 articles and posts · last 30 days