0

I have problem with sass code...

 @for $i from 1 through 3 {
      &:nth-child(#{$i}) { 
        transition: all (0.2*$i)s ease; 
      }
    }

its compiled like this

label p:nth-child(1) {
  transition: all 0.2 s ease;
}
label p:nth-child(2) {
  transition: all 0.4 s ease;
}
label p:nth-child(3) {
  transition: all 0.6 s ease;
}

Need to remove space after time

thanx

sall brown
  • 135
  • 2
  • 10
  • cimmanon are you kidding me? – sall brown Oct 13 '15 at 20:14
  • 1
    @for $i from 1 through 3 { &:nth-child(#{$i}) { transition: all (0.2s*$i) ease; } } – 1mike12 Oct 13 '15 at 20:19
  • 1
    you just have to bring the "s" into the multiplication, which will treat it as a unit. Also cimmanon is not wrong, since the solution's in the other link. Welcome to the cold, harsh world of stackoverflow! – 1mike12 Oct 13 '15 at 20:19

0 Answers0