Answers for "loops scss"

CSS
10

loop scss

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

loops scss

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

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

Browse Popular Code Answers by Language