How to print a class if there is a variable name

I have a variable:

@test: this_is_var;

      

And I have a class

.my-@{test}-class{}

      

How can I print this class in another class?

This code is incorrect:

.test-class{
    .my-@{test}-class();
}

      

But this code works fine

.test-class{
    .my-this_is_var-class();
}

      

Why? And how to print this class .my-@{test}-class()

:?

+3


source to share


1 answer


Your wrong option works well in codepen. Perhaps you should write ~{}

in your variable. Here's an example .



0


source







All Articles