Das Mixin graycity steht unter der "MIT License (MIT)"
This mixin graycity is published under the "MIT License (MIT)"
http://www.opensource.org/licenses/mit-license.php
Created
May 26, 2012 19:50
-
-
Save SimonWpt/2795093 to your computer and use it in GitHub Desktop.
SASS mixin graycity
This file contains 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 | |
// graycity($gray, $opacity) | |
@include graycity(0.5, 0.7) |
This file contains 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
@mixin graycity($gray: 0.7, $opacity: 0.8) | |
opacity: $opacity | |
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(grayscale=$gray)" | |
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') | |
filter: gray($gray) | |
-webkit-filter: grayscale($gray * 100%) | |
&:hover | |
opacity: 1 | |
filter: none | |
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(grayscale=0)" | |
-webkit-filter: grayscale(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment