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

Problem with mixins #11

Open
roman-savitskyi opened this issue May 15, 2017 · 2 comments
Open

Problem with mixins #11

roman-savitskyi opened this issue May 15, 2017 · 2 comments

Comments

@roman-savitskyi
Copy link

roman-savitskyi commented May 15, 2017

$circlePaddings = 7 19 0

_setCirclePaddings()
	for item, index in $circlePaddings
		&:nth-of-type({index+1})
			.circle-container
				padding-bottom unit(item,px)

[18:31:58] Plumber found unhandled error:
Error in plugin 'gulp-stylus'
Message:
25| value-rem = unit(value ,'rem');
26| }
27| push(values-rem,value-rem)
28| } else {
29| push(values-rem,match('px$',''+value) ? unquote(value) : value)
------------------------------------------------------------------------^
30| }
31| }
32| {prop} : values-rem;

TypeError: expected string, ident or literal, but got unit:0px

Plugin parse variable as number and get error.

Additional research: parser broke when we use the variable in the loop.

@jaywcjlove
Copy link
Owner

How did you use it?
Can you look at the source code?
@SavitskyiRoman

@roman-savitskyi
Copy link
Author

I used via gulp.
Everything is OK except parsing loops.

Parser can't associate 'item' variable with number

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