Skip to content

Instantly share code, notes, and snippets.

@metodribic
Created February 3, 2020 06:17
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 metodribic/f4cb65ae526317cfcfb8ca02959a8473 to your computer and use it in GitHub Desktop.
Save metodribic/f4cb65ae526317cfcfb8ca02959a8473 to your computer and use it in GitHub Desktop.
CSS attribute selectors
// This attribute exist on the element
[value]
// This attribute has a specific value of cool
[value='cool]
// This vlaue attribute contains word cool
[value*='cool]
// This vlaue attribute contains word cool in a space-separated list
[value~='cool]
// This attribute value starts with word cool
[value^='cool]
// This attribute value starts with word cool in dashed separated value list
[value|='cool]
// This attribute value ends with word cool
[value$='cool]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment