Alessandro_Russo
Alessandro_Russo

Reputation: 2191

How i can include a SASS mixin with a variable?

It is possible to @include a @mixin with a variable like $mixin-var?

@mixin hide{
    background: transparent;
}

$mixin-var: hide;

.hide{
    @include $mixin-var;
}

If yes how I can do that?

Upvotes: 0

Views: 67

Answers (1)

beanic
beanic

Reputation: 562

I don't thing so. The only sass way that it exists for the moment is use @include [mixin_name] like the sass documentation says https://sass-lang.com/documentation/at-rules/mixin

Upvotes: 1

Related Questions