M
M
Michael R.2018-05-29 19:16:11
Sass
Michael R., 2018-05-29 19:16:11

How to correctly display a variable in the body of a class (SCSS)?

Hey!
How to correctly display $style in the body of the class?
Example:

$class: test;
$style: text-align: center;

.#{$class}
{
 $style
}

Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iBird Rose, 2018-05-29
@Mike_Ro

for this there is extend https://sass-scss.ru/documentation/pravila_i_direk...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question