Skip to content

Instantly share code, notes, and snippets.

@andrescifuentesr
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrescifuentesr/152b20519d0c7b52a365 to your computer and use it in GitHub Desktop.
Save andrescifuentesr/152b20519d0c7b52a365 to your computer and use it in GitHub Desktop.
A simple grid mixin
//=================================
/* Simple grid */
@mixin simple-grid($nombre-items , $margin-right ){
width: ( (100% - ( ($nombre-items - 1) * $margin-right) ) / $nombre-items);
margin-right: $margin-right;
float:left;
&:nth-child(n) {
margin-right: $margin-right;
}
&:nth-child( #{$nombre-items}n) {
margin-right: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment