Wildcards In CSS [blog]
Read OriginalThis 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.
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