Skip to content

Instantly share code, notes, and snippets.

@paularmstrong
Created September 5, 2011 23:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paularmstrong/1196150 to your computer and use it in GitHub Desktop.
Save paularmstrong/1196150 to your computer and use it in GitHub Desktop.
CSS3 Attribute Selectors Are Awesome
a[href*="twitter.com"],
a[href*="github.com"],
a[href*="dribbble.com"],
a[href*="linkedin.com"] {
background-image: url(images/icons.png);
background-position: 2px 2px;
background-repeat: no-repeat;
padding-left: 20px;
}
a[href*="github.com"] { background-position: 2px -23px; }
a[href*="dribbble.com"] { background-position: 2px -48px; }
a[href*="linkedin.com"] { background-position: 2px -73px; }
@adamramadhan
Copy link

fuck, never thought of this, how can i don`t think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment