Skip to content

Instantly share code, notes, and snippets.

@internoma
Created January 6, 2013 11:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save internoma/4466619 to your computer and use it in GitHub Desktop.
Save internoma/4466619 to your computer and use it in GitHub Desktop.
Desaturate & saturate css3
.desaturate {
filter: grayscale(100%); /* Current draft standard */
-webkit-filter: grayscale(100%); /* New WebKit */
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%); /* Not yet supported in Gecko, Opera or IE */
filter: url(resources.svg#desaturate); /* Gecko */
filter: gray; /* IE */
-webkit-filter: grayscale(1); /* Old WebKit */
}
.saturate {
filter: grayscale(0%); /* Current draft standard */
-webkit-filter: grayscale(0%); /* New WebKit */
-moz-filter: grayscale(0%);
-ms-filter: grayscale(0%);
-o-filter: grayscale(0%); /* Not yet supported in Gecko, Opera or IE */
filter: url(resources.svg#desaturate); /* Gecko */
filter: none; /* IE */
-webkit-filter: grayscale(0); /* Old WebKit */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment