I decided to use SCSS to build a set of helpful mixins (think it will get more popular than LESS over time). What I'm trying to achieve is to pass a set of keywords in random order as Mixin argument, then check which keywords have been passed.
Below is an example with some pseudocode:
@mixin text($args){
// pseudocode:
args->sm {font-size: 10px;}
args->md {font-size: 16px;}
args->lg {font-size: 24px;}
args->red {color: red;}
args->green {color: green;}
args->blue {color: blue;}
args->bold {font-weight: bold;}
}
.mytext {
@include text(red,sm,bold);
}
Any idea? Simpler solution is better :)