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 variable variable? #1343

Closed
JamyGolden opened this issue Jul 18, 2013 · 2 comments
Closed

Mixin variable variable? #1343

JamyGolden opened this issue Jul 18, 2013 · 2 comments

Comments

@JamyGolden
Copy link

Would it be possible to have variable function names?
For example:

@mixin all-sprite-properties( $sprite-name, $image){
    @include #{sprite-name}-sprite($image);
    height: #{sprite-name}-sprite-height($image);
    width: #{sprite-name}-sprite-width($image);
}

So the output of:

@include all-sprite-properties(icons, left-arrow);

would be

@include icons-sprite(left-arrow);
height: icons-sprite-height(left-arrow);
width: icons-sprite-width(left-arrow);

This is all assuming that what I'm trying to do doesn't already have a simple mixin.

@Snugug
Copy link
Contributor

Snugug commented Jul 19, 2013

This belongs in the Sass issue queue and is a duplicate of Sass 626

@chriseppstein
Copy link
Member

This just landed on master. sass/sass#812

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

3 participants