Skip to content

Instantly share code, notes, and snippets.

@afonsoalban
Created September 22, 2015 12:52
Show Gist options
  • Save afonsoalban/57a2280d8afda9a501dd to your computer and use it in GitHub Desktop.
Save afonsoalban/57a2280d8afda9a501dd to your computer and use it in GitHub Desktop.
SCSS snippets
@mixin columns($numberOfColumns, $margin){
$size: ($margin * ($numberOfColumns - 1) ) / $numberOfColumns;
float: left;
margin-left: $margin;
width: calc(#{100 / $numberOfColumns}% - #{$size});
&:nth-child(#{$numberOfColumns}n+1){
clear: left;
margin-left: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment