Sublime Forum

SASS Error With Variable Interpolation

#1

I’m switching from Atom to ST3 and now having a problem passing a property value in a SASS mixin. When I try to compile the SASS file, it says this (See below.) “isn’t a valid CSS value.”

@mixin transition($prop, $values...) {
	-webkit-#{$prop}: $values;
	   -moz-#{$prop}: $values;
	    -ms-#{$prop}: $values;
		 -o-#{$prop}: $values;
			   $prop: $values;
}
0 Likes

#2

Really? No one here has ever had a problem with SASS variable interpolation in ST3? The code above works fine in Atom. I call it with a standard INCLUDE, (@include transition(box-shadow 600ms ease);) but the build throws an error at the very first interpolation. I even tried it with interpolation syntax at the end where it didn’t need to be:

@mixin transition($prop, $values...) {
-webkit-#{$prop}: $values;
   -moz-#{$prop}: $values;
	-ms-#{$prop}: $values;
	 -o-#{$prop}: $values;
		#{$prop}: $values;

}

0 Likes

#3

Does Sublime Text come by default within a SASS compiler/builder?

If so, the open a issue on the Default Packages issue tracker:

  1. https://github.com/sublimehq/Packages/issues

Otherwise, you need to find out which third package you installed which provides the SASS builder, and open a issue on its issue tracker.

0 Likes