SASS Grayscale mixin

// ---- // 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: 50%; .grayscale { @include grayscale_element(#{$value}); &:hover { @include grayscale_element(0); } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.