I am currently learning SCSS and I have successfully converted the CSS code below to SCSS, but now I am struggling with completing the rest. I have tried looking for help online, but so far no luck. Can someone please assist me with this?
.par-1 {
width: 3px;
color:#fff;
padding: 1px 0;
}
.par-2 {
width: 6px;
color: #000;
padding: 0 2px;
}
.par-3 {
width: 9px;
color: #fff;
padding: 3px 0;
}
.par-4 {
width: 12px;
color: #000;
padding: 0 4px;
}
.par-5 {
width: 15px;
color: #fff;
padding: 5px 0;
}
.par-6 {
width: 18px;
color: #000;
padding: 0 6px;
}
So far, I have only managed to adapt the widths using a loop in SCSS, but I can't seem to figure out the remaining properties. Any guidance would be greatly appreciated! Thank you.
$a:1;
@for $a from 1 through 6 {
.item-#{$a}
{width: 3px * $a; }
}