class name generator

30 views
Skip to first unread message

Burak Ulutoprak

unread,
Jul 18, 2014, 8:45:20 AM7/18/14
to closure-style...@googlegroups.com
Hi, 
I would like to generate class name by a function . First I thought mixin can handle this but I could not find a solution to do it. 
So what I want is to make this function work. 


@defmixin genClassNames(CLASSNAME_) {
CLASSNAME_,  CLASSNAME_"Diabled",CLASSNAME_Selected
}

@mixin genClassNames("btnBlue"){
          color:blue;
}



-------------------------------------
So I want following out after gss compile 

.btnBlue,.btnBlueOver,.btnBlueDown,.btnBlueDisabled {
    color:blue;
}


Also, is there anyway to generate class code itself using functions. As I understand functions are used to generate content of class definition.
Reply all
Reply to author
Forward
0 new messages