Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created November 7, 2013 23:22
Show Gist options
  • Save billerickson/7363596 to your computer and use it in GitHub Desktop.
Save billerickson/7363596 to your computer and use it in GitHub Desktop.
Desaturate social sharing icons, and resaturate on hover
.post-info .comment-button,
.post-info .fb-like,
.post-info iframe {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */
}
.post-info .comment-button:hover,
.post-info .fb-like:hover,
.post-info iframe:hover {
cursor: pointer;
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale");
-webkit-filter: grayscale(0%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment