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

@mixin flex() throws no errors when passed space seperated values #10

Closed
jeffkamo opened this issue Mar 14, 2014 · 3 comments · Fixed by #11
Closed

@mixin flex() throws no errors when passed space seperated values #10

jeffkamo opened this issue Mar 14, 2014 · 3 comments · Fixed by #11

Comments

@jeffkamo
Copy link
Contributor

It's an easy mistake to accidentally type out...

@include flex(1 0 auto);

But that doesn't actually work, as the mixin expects three separate parameters that must be comma separated. Like...

@include flex(1, 0, auto);

Is there a way to make Sass throw an error when commas are forgotten?

@kpeatt
Copy link
Contributor

kpeatt commented Mar 14, 2014

I think I've got a fix for this. Do a check to see if $fg is a list and then, if it is, grab the first list item. I'll up a PR.

kpeatt added a commit to kpeatt/sass-flex-mixin that referenced this issue Mar 14, 2014
mastastealth added a commit that referenced this issue Mar 14, 2014
Check if the argument passed to flex() is a list and return the right value. Fixes #10.
@mastastealth
Copy link
Owner

Thanks @kpeatt ! I was wondering for a sec why it wouldn't be possible just to use a single argument, but I see it's divided because the fallbacks only use the grow option. Fix has been merged. :)

@Webtransformer
Copy link

Webtransformer commented Oct 28, 2016

Sorry... but I cant find the problem. I am getting:

Error: wrong number of arguments (3 for 1) for flex
@include flex(1, 0, auto);

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