D
D
d3_dx2019-07-26 08:43:34
Sass
d3_dx, 2019-07-26 08:43:34

How to loop through classes in sass?

There are a number of buttons with the class "button"
To all of them, for example, add the name of the colors to get the following:
class="button--red"
class="button--blue"
class="button--green"
class ="button--white"
class="button--yellow"
And so on .
I think this is implemented in a loop, and the class names are taken from an array. But how do you write it down?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
ProjectSoft, 2019-07-26
@d3_dx

A
Aleksandr, 2019-07-26
@Sashjkeee

And what about sass? sass - css preprocessor, it does not affect the dom in any way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question