Danelo Danelo - 1 month ago 15
Sass (Sass) Question

WebStorm scss compiler error with transition/transform

enter image description here

I am trying to make a web page, and I need to use some images with transform/transition. But the Scss compiler from WebStorm gives me that error.

What can I do ? See in the image above.

Answer

For your @include you need to @mixin.

@MIXIN example:

@mixin protoName($someValue) {
  -webkit-protoName: $someValue;
     -moz-protoName: $someValue;
      -ms-protoName: $someValue;
          protoName: $someValue;
}

For yours code it can be something like this:

@mixin transform($val) {
  -webkit-transform: $val;
     -moz-transform: $val;
      -ms-transform: $val;
          transform: $val;
}

main {
 .wrap {
    @include transform(rotate(45deg) translate3d(0,0,0));
 }
}

And your output look like this:

main .wrap {
    -webkit-transform: rotate(45deg) translate3d(0,0,0);
       -moz-transform: rotate(45deg) translate3d(0,0,0);
        -ms-transform: rotate(45deg) translate3d(0,0,0);
            transform: rotate(45deg) translate3d(0,0,0);
}

You can read more about it Here