Need help compiling SCSS to CSS
For a project, I had to compile SCSS code to CSS. Everything seemed to work, except for a @for loop similar to this :
<span style="color:#323232;">$base-color: #036;
</span><span style="color:#323232;">
</span><span style="color:#323232;">@for $i from 1 through 3 {
</span><span style="color:#323232;"> ul:nth-child(3n + #{$i}) {
</span><span style="color:#323232;"> background-color: lighten($base-color, $i * 5%);
</span><span style="color:#323232;"> }
</span><span style="color:#323232;">}
</span>
This loop hasn’t been compiled at all to CSS, as CSS does not loop though selectors. But is there a way to loop this code with JavaScript ?
Add comment