afonsoalban
9/22/2015 - 12:52 PM

SCSS snippets

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;
	}
}