I'm trying to create a family of CSS selectors using a for loop:
@for $i from 1 through 3 {
.bottom-#{$i} {
bottom: #{$i}%;
}
}
I want an output that looks like this:
.bottom-1 { bottom: 1% }
.bottom-2 { bottom: 2% }
.bottom-3 { bottom: 3% }
But SASS doesn't like the % sign- it's trying to eval the statement. I'm assuming there is a way to escape a character like that, but I can't find it.
Any ideas?
Thanks