Answer the question
In order to leave comments, you need to log in
How to generate SCSS variables?
SCSS allows you to generate classes in a loop. How to generate variables?
$base-rem: 20;
@for $px from 1 through 40 {
$px#{$px}: #{$px / $base-rem}rem;
}
$px40: #{40 / $base-rem}rem;
Answer the question
In order to leave comments, you need to log in
To be honest, I have never heard of scss generating variables for its use.
All the "magic" of scss happens when css is generated - there the program goes through the file and processes the code accordingly.
I can advise you to try to generate the desired code in any programming language and paste it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question