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

Passing Variables to Mixins with "Variable Arguments" not possible #128

Open
tobstop opened this issue Sep 6, 2013 · 0 comments
Open

Passing Variables to Mixins with "Variable Arguments" not possible #128

tobstop opened this issue Sep 6, 2013 · 0 comments

Comments

@tobstop
Copy link

tobstop commented Sep 6, 2013

$color-01: red;

@mixin box-shadow($shadow...) {
-webkit-box-shadow:$shadow;
-moz-box-shadow:$shadow;
box-shadow:$shadow;
}

.test {
@include box-shadow(0 0 4px rgba($color-01,0.2), inset 0 0 10px rgba(0,0,0,0.05));
}

is compiled to:
.test {
-webkit-box-shadow: 0 0 4px, inset 0 0 10px rgba(0, 0, 0, 0.05);
-moz-box-shadow: 0 0 4px, inset 0 0 10px rgba(0, 0, 0, 0.05);
box-shadow: 0 0 4px, inset 0 0 10px rgba(0, 0, 0, 0.05);
}

The color of the first box-shadow is missing.

It works if you don't use a variable for the color:

.test {
@include box-shadow(0 0 4px rgba(0,0,0,0.2), inset 0 0 10px rgba(0,0,0,0.05));
}

is compiled to:
.test {
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(0, 0, 0, 0.05);
-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(0, 0, 0, 0.05);
box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(0, 0, 0, 0.05);
}

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

1 participant