@import "../common/mixin.scss";

[class*="tu-col-"] {
	float: left;
	box-sizing: border-box;
}

.tu-col-0 {
	display: none;
}

@for $i from 0 through 24 {
	.tu-col-#{$i} {
		width: (1 / 24 * $i * 100) * 1%;
	}

	.tu-col-offset-#{$i} {
		margin-left: (1 / 24 * $i * 100) * 1%;
	}

	.tu-col-pull-#{$i} {
		position: relative;
		right: (1 / 24 * $i * 100) * 1%;
	}

	.tu-col-push-#{$i} {
		position: relative;
		left: (1 / 24 * $i * 100) * 1%;
	}
}

@include res(xs) {
	.tu-col-xs-0 {
		display: none;
	}

	@for $i from 0 through 24 {
		.tu-col-xs-#{$i} {
			width: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-xs-offset-#{$i} {
			margin-left: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-xs-pull-#{$i} {
			position: relative;
			right: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-xs-push-#{$i} {
			position: relative;
			left: (1 / 24 * $i * 100) * 1%;
		}
	}
}

@include res(sm) {
	.tu-col-sm-0 {
		display: none;
	}

	@for $i from 0 through 24 {
		.tu-col-sm-#{$i} {
			width: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-sm-offset-#{$i} {
			margin-left: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-sm-pull-#{$i} {
			position: relative;
			right: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-sm-push-#{$i} {
			position: relative;
			left: (1 / 24 * $i * 100) * 1%;
		}
	}
}

@include res(md) {
	.tu-col-md-0 {
		display: none;
	}

	@for $i from 0 through 24 {
		.tu-col-md-#{$i} {
			width: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-md-offset-#{$i} {
			margin-left: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-md-pull-#{$i} {
			position: relative;
			right: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-md-push-#{$i} {
			position: relative;
			left: (1 / 24 * $i * 100) * 1%;
		}
	}
}

@include res(lg) {
	.tu-col-lg-0 {
		display: none;
	}

	@for $i from 0 through 24 {
		.tu-col-lg-#{$i} {
			width: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-lg-offset-#{$i} {
			margin-left: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-lg-pull-#{$i} {
			position: relative;
			right: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-lg-push-#{$i} {
			position: relative;
			left: (1 / 24 * $i * 100) * 1%;
		}
	}
}

@include res(xl) {
	.tu-col-xl-0 {
		display: none;
	}

	@for $i from 0 through 24 {
		.tu-col-xl-#{$i} {
			width: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-xl-offset-#{$i} {
			margin-left: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-xl-pull-#{$i} {
			position: relative;
			right: (1 / 24 * $i * 100) * 1%;
		}

		.tu-col-xl-push-#{$i} {
			position: relative;
			left: (1 / 24 * $i * 100) * 1%;
		}
	}
}
