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
-
-
Save bitflower/447f98d76ef4f206b645 to your computer and use it in GitHub Desktop.
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) | |
&: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