Created
September 21, 2015 06:16
-
-
Save raphaelchaib/44add8e47e1a0a00cf7e to your computer and use it in GitHub Desktop.
CSS: Desaturate elements with filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| img.desaturate { | |
| -webkit-filter: grayscale(100%); | |
| filter: grayscale(100%); | |
| filter: gray; | |
| filter: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' height='0'><filter id='greyscale'><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>#greyscale"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment