Menu

1 / 4

The Future of CSS: Target Multiple Classes with the Class Prefix Selector

JavaScript in Plain English - Medium·Infodigit·2 days ago
#QKi3s8bl
Reading 0:00
15s threshold

Member-only story

CSSHTMLWeb DevelopmentTechnologyProgramming The Future of CSS: Target Multiple Classes with the Class Prefix Selector

Infodigit

5 min readAug 19, 2026

Press enter or click to view image in full size

To target multiple classes that share the same prefix, you’d typically have to resort to adding an extra base classes to your markup or to using badly performing attribute selectors. To make things easier, CSS is getting a new selector: The Class Prefix Selector ( .prefix-* ).

⚠️ This post is about an upcoming CSS feature. You can’t use it … yet.

This feature is hot off the press — it was resolved on only two weeks ago — and currently only exists in spec text.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.