Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on css filters #331

Closed
fergusb opened this issue Feb 25, 2015 · 3 comments
Closed

Fails on css filters #331

fergusb opened this issue Feb 25, 2015 · 3 comments

Comments

@fergusb
Copy link

fergusb commented Feb 25, 2015

Something like...

body.negative header p {
 -webkit-filter: invert(100%);
 -moz-filter: invert(100%);
 -ms-filter: invert(100%);
 filter: invert(100%);
}

will result in a total parse error.

@fergusb fergusb changed the title Fails on invert filter Fails on css filters Feb 25, 2015
@fergusb
Copy link
Author

fergusb commented Feb 25, 2015

Filter failure is general to sass/scss.
Here's a mixin workaround:

@mixin filter($filter-type, $filter-amount) { 
  -webkit-filter: $filter-type+unquote('(#{$filter-amount})');
  -moz-filter: $filter-type+unquote('(#{$filter-amount})');
  -ms-filter: $filter-type+unquote('(#{$filter-amount})');
  -o-filter: $filter-type+unquote('(#{$filter-amount})');
  filter: $filter-type+unquote('(#{$filter-amount})');
}

h/t GeneLocklin: https://gist.github.com/GeneLocklin/2957278

@eevee
Copy link
Collaborator

eevee commented Feb 25, 2015

Hmm. Not a parse error; problem is that invert specifically is a builtin Sass function that expects a color.

@eevee eevee closed this as completed in 6c3c4f0 Jun 9, 2016
@eevee
Copy link
Collaborator

eevee commented Jun 9, 2016

Fixed in 1.3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants