Loop for in Sass

0

I am learning SASS (with scss format) and I have a doubt with the for loop. I have 10 div and I want to give a order to each of them. Then I thought about this:

The issue is that the nth-child () does not support the variable $ i. Any way to do it? With another selector?

Thank you.

    
asked by Carlos Rayón Álvarez 02.08.2018 в 18:13
source

1 answer

2

Ok I found the solution. For nth-child () to support that variable, I have to put it as # {$ i} . I leave a screenshot in case something similar happens to someone.

    
answered by 02.08.2018 / 18:17
source