Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
Forked from rk/for-loops.scss
Created April 14, 2011 20:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriseppstein/920453 to your computer and use it in GitHub Desktop.
Save chriseppstein/920453 to your computer and use it in GitHub Desktop.
// An example for:
// http://blog.rebeltix.com/2011/04/css-sass-and-how-to-improve-the-mess/
@for $i from 1 through 6 {
h#{$i} {font-size: 12pt + (14 - $i*2);}
}
@for $i from 1 through 3 {
box-level-#{$i} {background-color: #333 + ($i * #333);}
}
@mixin floated-image($dir) {
img.#{$dir} {float: $dir;}
}
@each $dir in left right {
@include floated-image($dir);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment