I have the following operation sass make a loop in one of their attributes and want to be a percentage width% but the output is very different
//h1,h2,h3,h4,h5,h6
$i: 6;
@while $i > 0 {
h#{$i} {
position: relative;
padding-left: 1px + $i;
padding-right: 1px + $i;
&::before {
background: $color-ternary;
content: "";
display: block;
height: 1px;
position: absolute;
width: #{$i}'%';
bottom: 0;
left: $i px;
}
}
$i: $i - 1;
} the output
width: 1"%";
the expectatives
width: 1%;
width: 2%;
width: 3%;
etc...