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
Can't transition a transform #794
Comments
Well it turned out to be a LibSass issue, sorry about that :) |
what version of libsass do you use? I've got the same problem.. |
I'm using sass2scss 1.0.3 compiled with Visual Studio under Windows 10. I still have no idea what's the problem, but I do know it's caused by libsass, because the same code compiles just fine using the nodejs version. I've ended up writing a custom mixin overriding the original one, that seems to compile and pretty much works just fine for me. Here it is: @mixin trans-prefix($value, $prefix: "") {
$slice: str-slice(inspect($value), 0, 9);
@if $slice == "transform" {
#{$prefix}transition: #{$prefix}#{$value};
} @else {
#{$prefix}transition: $value;
}
}
@mixin transition($properties...) {
@if length($properties) > 1 {
$spec: ();
@for $i from 1 through length($properties) {
$spec: append($spec, nth($properties, $i), comma);
}
} @else {
$spec: $properties;
}
@include trans-prefix($spec, -webkit-);
@include trans-prefix($spec, -moz-);
@include trans-prefix($spec);
} |
Man, finding a working transition mixin is pretty damn hard. Thanks for this one, works perfectly. |
Refs sass/node-sass#1227 |
Thanks @TonyBogdanov! Spent way long searching for what I suspected was a version difference between production and dev. Never found the issue, but that mixin works like a charm. 👍 |
I believe this has come up before, but I couldn't find a solution so far.
The following Sass:
Produces the following CSS:
I believe you can already see my issue, none of the options except the property names get through when there is a "transform" present.
I'm using libSass on Windows 10 if it matters.
Thanks in advance!
The text was updated successfully, but these errors were encountered: