Is there any way for the Sass loop to do this?

want to input this, continue to + 4 from 3

.test-3 {
}
.test-7 {
}
.test-11 {
}
.test-15 {
}
.test-19 {
}
.test-23 {
}
.

it would be better if we could do this, but it feels a little more difficult

.test-3 {
}
.test-4 {
}

.test-7 {
}
.test-8 {
}

.test-11 {
}
.test-12 {
}

.test-15 {
}
.test-16 {
}
.

Don"t know if the Sass loop has a way to do these things?

Apr.13,2022

double-layer loop would be fine


$i: 3;
@while $i < 20 {
  .item--sharp{$i} { width: 2em * $i; }
  $i: $i + 4;
}

http://beautifytools.com/scss...
http: / / www.ruanyifeng.com/blo...

Menu