Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Created January 28, 2020 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomhodgins/3033c8d3f8b0f7e1970b61ea7ff39fbe to your computer and use it in GitHub Desktop.
Save tomhodgins/3033c8d3f8b0f7e1970b61ea7ff39fbe to your computer and use it in GitHub Desktop.
What if CSS had something like [attribute="selectors"] for matching partial tag names
<custom-element></custom-element>
<custom-element-1></custom-element-1>
<custom-2-element></custom-2-element>
<custom-element-name></custom-element-name>
<custom-elementname></custom-elementname>
<style>
/* equals tag name */
custom-element {}
/* tag name starts with */
(^custom-) {}
/* tag name ends with */
($-element) {}
/* tag name includes */
(*name) {}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment