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

Adding '@css {}' automatically caused an error #63

Closed
zhysky opened this issue Mar 3, 2020 · 1 comment
Closed

Adding '@css {}' automatically caused an error #63

zhysky opened this issue Mar 3, 2020 · 1 comment
Labels

Comments

@zhysky
Copy link

zhysky commented Mar 3, 2020

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;
@ThisIsManta ThisIsManta added the bug label May 5, 2020
@ThisIsManta
Copy link
Owner

This will be fixed in v2.14.2 or newer.

ThisIsManta pushed a commit that referenced this issue May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants