Answers for "how to use for loop in a sass"

CSS
11

loop scss

@for $i from 1 through 6 {
    .grid-#{$i} {
        width: 100px*$i;
    }
}
Posted by: Guest on March-23-2020
3

sass loops

$base-color: #036;

@for $i from 1 through 3 {
  ul:nth-child(3n + #{$i}) {
    background-color: lighten($base-color, $i * 5%);
  }
}
Posted by: Guest on February-19-2020

Code answers related to "how to use for loop in a sass"

Browse Popular Code Answers by Language