Sass mixin that takes a class as it's argument

sass

Solution

You need to quote your class:

.myClass1{
  @include myMixin(".myClass");
}

Problem

I'm trying to create a Sass mixin that takes a class as it's argument: ``` @mixin myMixin($el){ > #{$el}{ background: white; } } .myClass1{ @include myMixin(div); } ``` The above code works fine. I.e., elements are accepted. But this calls an error: ``` .myClass1{ @include myMixin(.myClass); } ``` I've tried wrapping it in quotes and `#{}` but still no dice. Curiously, the `*` selector also does not work.

Original source