Created
October 28, 2013 10:13
-
-
Save mturjak/7194396 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<div class="grayscale">test2</div> |
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
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
@mixin grayscale_element($value) { | |
-webkit-filter: #{"grayscale(#{$value})"}; | |
-moz-filter: #{"grayscale(#{$value})"}; | |
filter:#{"grayscale(#{$value})"}; | |
} | |
$value: 70%; | |
.grayscale { | |
width: 100px; | |
height: 100px; | |
background-color: #e86ea4; | |
@include grayscale_element(#{$value}); | |
&:hover { | |
@include grayscale_element(0); | |
} | |
} |
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
.grayscale { | |
width: 100px; | |
height: 100px; | |
background-color: #e86ea4; | |
-webkit-filter: grayscale(70%); | |
-moz-filter: grayscale(70%); | |
filter: grayscale(70%); | |
} | |
.grayscale:hover { | |
-webkit-filter: grayscale(0); | |
-moz-filter: grayscale(0); | |
filter: grayscale(0); | |
} |
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
<div class="grayscale">test2</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment