How to use Compass filter mixin?

Caio Tarifa picture Caio Tarifa · Apr 7, 2013 · Viewed 16.6k times · Source

I'm trying to use filter mixin this way in SCSS:

a {
  @include filter(grayscale(100%));
}

But when I compile, I got this error:

Undefined mixin 'filter'.

I'm using the latest version of this Gem with Rails framework.

http://compass-style.org/reference/compass/css3/filter/

Answer

Logan Koester picture Logan Koester · May 10, 2013

SASS Example

@import 'compass/css3/filter'

.filtered
  @include filter(grayscale(50%))
  @include filter(blur(2px))