Simplify my css with Sass

How can i simplify this code with Sass ( mixin, function or loop ) ?

span:nth-child(1) {
   margin-top: -100px;
}
span:nth-child(2) {
   margin-top: -70px;
   margin-left: 70px;
}
span:nth-child(3) {
   margin-left: 100px;
}
span:nth-child(4) {
   margin-top: 70px;
   margin-left: 70px;
}
span:nth-child(5) {
   margin-top: 100px;
}
span:nth-child(6) {
  margin-top: 70px;
  margin-left: -70px;
}
span:nth-child(7) {
  margin-left: -100px;
}
span:nth-child(8) {
  margin-top: -70px;
  margin-left: -70px;
}

Would this be helpful? Just search “Nth child sass loop” on google for more examples.

http://stackoverflow.com/questions/20120399/use-nth-child-value-as-a-sass-variable

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.