ThisIsManta/stylus-supremacy

Adding '@css {}' automatically caused an error

Closed this issue · 1 comments

I use stylus in vue though import './style.styl'
After formating, it adds '@css { }' and my vue project reported an error 'Failed to compile.'
Can format without adding '@css { }'?

$spacing-types = {
    m: margin,
    p: padding
};
$spacing-directions = {
    t: top,
    r: right,
    b: bottom,
    l: left
};
$spacing-base-size = 1rem;
$spacing-sizes = {
   '0': 0,
   '1': .25,
   '2': .5,
   '3': 1,
   '4': 1.5,
   '5': 3
};

for typeKey, type in $spacing-types 
   for directionKey, direction in $spacing-directions 
	for sizeKey, size in $spacing-sizes 
	    .{typeKey}{directionKey}{sizeKey} 
		{type}-{direction}: size * $base-font-size;

After formating, it adds '@css { }'

for typeKey, type in $spacing-types 
   for directionKey, direction in $spacing-directions 
	for sizeKey, size in $spacing-sizes 
	   .{typeKey}{directionKey}{sizeKey} 
		{type}@css { - }{direction}: size * $base-font-size;

This will be fixed in v2.14.2 or newer.