CSS Gets a Class Prefix Selector to Simplify Targeting Multiple Classes
The Future of CSS: Target Multiple Classes with the Class Prefix Selector

The CSS Working Group has resolved to add a Class Prefix Selector (`.prefix-*`) to Selectors Level 5, allowing authors to target all classes sharing a prefix without brittle attribute selectors or extra base classes. Proposed by Lea Verou, the selector matches classes like `.btn-primary` and `.btn-secondary` with just `.btn-*`. It currently only supports hyphen separators, and empty or double-hyphen prefixes are excluded. Browser support is nonexistent, but feature detection via `@supports` is possible.
The `-*` part at the end makes the selector a **Class Prefix Selector** and will try to match any class that begins with that hyphen-separated prefix.