Reputation: 1614
I want to match some strings in my class name using mixin. It works without mixins, but when I used mixin, I can't pass the variable into the string.
What was working
div[class^='myclass-'], div[class*=' myclass-'] {
@content
}
What doesn't work
@mixin startWith($name){
div[class^=$name], div[class*=' ' + $name'] {
@content;
}
}
Upvotes: 0
Views: 493
Reputation: 9680
There is a typo in your code. Use this
@mixin startWith($name){
div[class^=$name], div[class*=$name] {
@content;
}
}
Upvotes: 1