peteboere / css-crush

CSS preprocessor.
http://the-echoplex.net/csscrush
MIT License
537 stars 51 forks source link

import using set variables? #70

Closed unetics closed 9 years ago

unetics commented 9 years ago

Is this posable? could it be? for example: @set {nav:greenNav;} @import "sections/$(nav).css"; or @set {nav:@import "sections/greenNav.css";} $(nav);

peteboere commented 9 years ago

Nope, unfortunately because variables are global and are dealt with after all imports have been resolved.

Not sure what you're trying to do but an @ifset directive might help you:

@ifset nav { @import "nav.css" }
@ifset not nav { @import "no-nav.css" }
unetics commented 9 years ago

thanks for taking the time to reply there is no ifset equals function either is there?

@ifset nav = default { @import "nav.css" } @ifset nav = green { @import "green.css" }