Remy Sharp 7/11/2026

Wildcards In CSS [blog]

Read Original

This article discusses the concept of wildcard selectors for HTML elements in CSS, such as `mdn-*` to match all custom elements starting with a prefix. It compares current workarounds using attribute selectors like `[class^="btn-"]` and `[class*="btn"]`, noting their limitations and brittleness. The author proposes adding native wildcard support to `querySelectorAll` for cleaner web component initialization, referencing Lea Verou's earlier proposal. The article also touches on parser constraints and the potential for glob-like patterns. It is relevant to web development, CSS, and front-end technology.

Wildcards In CSS [blog]

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet