Sha256: c56b4cdffb44ec2f0afeb8fee53c4b808c2df7075914b7c4439b3e8be76c2318

Contents?: true

Size: 1.93 KB

Versions: 3

Compression:

Stored size: 1.93 KB

Contents

@mixin make-container() {
	margin-right: auto;
	margin-left: auto;
	padding-right: $grid-gutter;
	padding-left: $grid-gutter;
	@include clearfix();
	// 992
		@include responsive(md) {
			max-width: ($screen-md - $grid-gutter * 2);
		}
	// 1440
		@include responsive(lg) {
			max-width: ($screen-lg - $grid-gutter * 2);
		}
}

@mixin make-row() {
	margin-right: ($grid-gutter * -1);
	margin-left: ($grid-gutter * -1);
	@include clearfix();
}

// col
	@mixin calc-col($index, $class, $type) {
		@if ($type == colwidth) and ($index > 0) {
			.col-#{$class}-#{$index} {
				width: percentage(($index / $grid-cols));
			}
		}
		@if ($type == offset) {
			.col-#{$class}-offset-#{$index} {
				margin-left: percentage(($index / $grid-cols));
			}
		}
		@if ($type == pull) {
			.col-#{$class}-pull-#{$index} {
				right: percentage(($index / $grid-cols));
			}
		}
		@if ($type == push) {
			.col-#{$class}-push-#{$index} {
				left: percentage(($index / $grid-cols));
			}
		}
	}

	@mixin float-col($class) {
		$i: 1;
		$list: "";
		$list: ".col-#{$class}-#{$i}";
		@for $i from (1 + 1) through $grid-cols {
			$list: "#{$list}, .col-#{$class}-#{$i}";
		}
		#{$list} {
			float: left;
		}
	}

	@mixin loop-col($columns, $class, $type) {
		@for $i from 0 through $columns {
			@include calc-col($i, $class, $type);
		}
	}

	@mixin make-col() {
		$i: 1;
		$list: "";
		$list: ".col-xx-#{$i}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
		@for $i from (1 + 1) through $grid-cols {
			$list: "#{$list}, .col-xx-#{$i}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
		}
		#{$list} {
			min-height: 1px;
			position: relative;
			padding-left: $grid-gutter;
			padding-right: $grid-gutter;
		}
	}

	@mixin make-grid($class) {
		@include float-col($class);
		@include loop-col($grid-cols, $class, colwidth);
		@include loop-col($grid-cols, $class, offset);
		@include loop-col($grid-cols, $class, pull);
		@include loop-col($grid-cols, $class, push);
	}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
material-sass-0.0.4 app/assets/stylesheets/material/mixin/_grid.scss
material-sass-0.0.3 app/assets/stylesheets/material/mixin/_grid.scss
material-sass-0.0.2 app/assets/stylesheets/material/mixin/_grid.scss