-
Notifications
You must be signed in to change notification settings - Fork 757
Open
Labels
Description
Link: https://www.w3.org/TR/2018/WD-selectors-4-20181121/
With the advent of custom elements and the growing popularity of web component libraries (especially those with common prefixes), the need for a way to target a tag selector using attribute match syntax has increased.
Use case
I have library x with a set of components: x-foo, x-bar, x-bat. I want to write styles influence only those components on the page but I'm not sure which components are in use.
Suggestions
In this thread, a few ideas were proposed: https://twitter.com/castastrophee/status/1433418836364210182?s=20
I'll do my best to summarize:
- Add support for wildcard syntax with selectors, i.e.
x-* { color: red; }. - Add support for wildcard syntax inside the
:is()pseudo-selector i.e.:is(x-*) - Add a tag or tagName attribute that can be queried i.e.,
[tag^="x-"]
claviska, bennypowers, Matsuuu, web-padawan, michaelwarren1106 and 3 more