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

Using a mixin as a variable #182

Closed
robberrones opened this issue Jan 13, 2011 · 3 comments
Closed

Using a mixin as a variable #182

robberrones opened this issue Jan 13, 2011 · 3 comments

Comments

@robberrones
Copy link

Hello,
I was wondering if there was any way of using a mixin as a variable.

Example:

// a gray gradient

.gradient (#FCFCFC, #FEFEFE);

//container gray BG

@thisBG: #FCFCFC;

//container gray BG gradient

@thisBG: .gradient(#FCFCFC, #FEFEFE);

A note: I've tried using e(".gradient(#FCFCFC, #FEFEFE)"); but it doesn't work.

Thanks, and keep up the great work!

@tyler-dot-earth
Copy link

Any chance we could see this in an upcoming version? It'd be nice to be able to do.

@ttfkam
Copy link
Contributor

ttfkam commented Oct 20, 2011

You could do this:

 .grayGradient () {
   .gradient(#FCFCFC, #FEFEFE);
 }

and then call the new mixin

 .someSelector {
   .grayGradient();
 }

@lukeapage
Copy link
Member

Moving to #538

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

4 participants