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 Call Interpolation #2594

Closed
Spedwards opened this issue May 22, 2015 · 1 comment
Closed

Mixin Call Interpolation #2594

Spedwards opened this issue May 22, 2015 · 1 comment

Comments

@Spedwards
Copy link

Currently Variable Interpolation doesn't work with Mixins and I'd like that to change. I'm actually surprised that it doesn't work.

.flair.flair-one { color: red; }
.flair.flair-two { color: green; }
.flair.flair-three { color: blue; }

.custom(@a; @b; @c) {
  &::before { .flair.flair-@{a}; }
  .flair.flair-@{b};
  &::after { .flair.flair-@{c}; }
}

.this-flair {
  .custom(one; two; three);
}

Should result in the following css:

.flair.flair-one { color: red; }
.flair.flair-two { color: green; }
.flair.flair-three { color: blue; }

.this-flair {
    color: green;
}
.this-flair::before {
    color: red;
}
.this-flair::after {
    color: blue;
}
@seven-phases-max
Copy link
Member

As a feature request this would be a duplicate of #1338 (with #1485 as a better alternative).
As for a question I suggested one of possible solutions in the corresponding SO topic.

@seven-phases-max seven-phases-max changed the title Variable Interpolation with Mixins Mixin Call Interpolation May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants