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

compiler error #548

Closed
of2607 opened this issue Dec 26, 2017 · 1 comment
Closed

compiler error #548

of2607 opened this issue Dec 26, 2017 · 1 comment

Comments

@of2607
Copy link

of2607 commented Dec 26, 2017

There is my scss:

@for $view from 3px through 16px{
	.w#{$view*100} {
		width:$view*100;
	}
}

I need this result:

.w300px{width:300px;}
.w400px{width:400px;}
..
..
.w1600px{width:1600px;}

But I get this result:

.w300{width:300;}
.w400{width:400;}
..
..
.w1600{width:1600;}

please help me thank you

@willpower232
Copy link

I am unsure how the original sass library handles the units in this situation but if you move the px into the loop, your result is achieved.

@for $view from 3 through 16{
    .w#{$view*100px} {
        width:$view*100px;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants