SCSS error
Does anyone know why do I get this error?
https://codepen.io/myntsu/pen/BaqdKOw
3 Replies
Try this :
@for $i from 0 through ($spheres - 1) {
That gets rid of the error and shows the circles.I haven’t looked through all the code so I might be missing something.
I will add that you don’t actually need to have $spheres - 1.
If you want 23 spheres you could just set the vale of $spheres to 23 and save having to subtract 1 from it. That is of course unless you are using this variable somewhere else in your sass file and it needs to be 24…Thank you
You want to use
#{}
for things where you want it to be interpreted literally and used for interpolation, not as a number nor a string https://sass-lang.com/documentation/interpolation
Numbers use it for giving values units