-1

I am trying to this but I am getting error on compile I don't know why and I am new to sass.

Error: Invalid CSS after " width: #{$i}%": expected expression (e.g. 1px, bold), was ";"


$list:  5 10 13 15 18 20 25 30 40 50 60 65 70 75 78 80 90 97 100;
@each $i in $list {
  .width#{$i} {
    width: #{$i}%;
  }
}
Suresh Pattu
  • 6,083
  • 16
  • 59
  • 91

1 Answers1

1

Just use percentage function

width: percentage($i/100);
antyrat
  • 27,479
  • 9
  • 75
  • 76