<commit_before>// GRID CALCULATIONS
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Note: We use !important statements for grid layout critical styles.
//       Like this you can define for example margin shorthands on a columns without affecting the grid indentation.

.spartan-grid() {
	// multiple mixins switch according to passed types

	// mixin for standard fluid grid with fluid gutter
	.spartan-create('fluid', 'fluid', @fixed-width, @fixed-gutter, @cols) {
		@spartan-width: 100%;

		// fluid gutter is calculated relatively to the static gutter in fixed grid width
		@spartan-row-gutter: round(percentage(@fixed-gutter / @fixed-width), @spartan-grid-precision);
		// percentage column gutter has to be slightly bigger than row indent because row indent changes the container width
		@spartan-col-gutter: round(percentage(@fixed-gutter / (@fixed-width + @fixed-gutter)), @spartan-grid-precision);

		// calculate the width of one grid column
		@spartan-one-col: (@spartan-width / @cols);

		// implement grid mixins with type dependent variables
		.spartan-grid > .spartan-grid-mixins(@spartan-width, @spartan-row-gutter, @spartan-col-gutter, @spartan-one-col);
	}

	// mixin for fluid grid and fixed gutter
	.spartan-create('fluid', 'fixed', @fixed-width, @fixed-gutter, @cols) {
		@spartan-width: 100%;

		// calculate the width of one grid column
		@spartan-one-col: (@spartan-width / @cols);

		// implement grid mixins with type dependent variables
		.spartan-grid > .spartan-grid-mixins(@spartan-width, @fixed-gutter, @fixed-gutter, @spartan-one-col);
	}

	// only one mixin for fixed grid needed because we cannot make fluid gutters in static grid
	.spartan-create('fixed', @gutter-type, @fixed-width, @fixed-gutter, @cols) {
		// calculate the width of one grid column
		@spartan-one-col: ((@fixed-width + @fixed-gutter) / @cols);

		// implement grid mixins with type dependent variables
		.spartan-grid > .spartan-grid-mixins(@fixed-width, @fixed-gutter, @fixed-gutter, @spartan-one-col);
	}

	// call switch mixin to calculate variables depending on grid configuration
	.spartan-grid > .spartan-create(@spartan-grid-type, @spartan-grid-gutter-type, @spartan-grid-fixed-width, @spartan-grid-fixed-gutter, @spartan-grid-max-cols);

	// unlock grid mixins with modified variables
	.spartan-grid-mixins(@width, @row-gutter, @col-gutter, @one-col) {
		.spartan-span-width(@num) {
			width: round((@one-col * @num), @spartan-grid-precision);
		}

		// indent grid columns either way with these mixins
		.spartan-indent(@num: 0) when (@num >= 0) {
			margin-left: round((@one-col * @num), @spartan-grid-precision);
		}

		.spartan-indent(@num: 0) when (@num < 0) {
			margin-left: round((@one-col * @num), @spartan-grid-precision);
		}

		// used only on .col for uniquely applied gutter
		.spartan-col-indent(@num: 0) {
			padding-left: @col-gutter !important;
		}

		// used only on .row for proper negative indents
		.spartan-row-indent(@num: 0) {
			margin-left: -@col-gutter;
		}

		// visually manipulate grid column order with these mixins
		.spartan-push(@num) {
			left: round((@one-col * @num), @spartan-grid-precision);
		}

		.spartan-pull(@num) {
			right: round((@one-col * @num), @spartan-grid-precision);
		}
	}

	// less loop to generate grid classes
	.spartan-loop (@index, @class: item, @mixin: '') when (@index > 0) {<commit_msg>optimise offset mixin<commit_after>// GRID CALCULATIONS
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Note: We use !important statements for grid layout critical styles.
//       Like this you can define for example margin shorthands on a columns without affecting the grid indentation.

.spartan-grid() {
	// multiple mixins switch according to passed types

	// mixin for standard fluid grid with fluid gutter
	.spartan-create('fluid', 'fluid', @fixed-width, @fixed-gutter, @cols) {
		@spartan-width: 100%;

		// fluid gutter is calculated relatively to the static gutter in fixed grid width
		@spartan-row-gutter: round(percentage(@fixed-gutter / @fixed-width), @spartan-grid-precision);
		// percentage column gutter has to be slightly bigger than row indent because row indent changes the container width
		@spartan-col-gutter: round(percentage(@fixed-gutter / (@fixed-width + @fixed-gutter)), @spartan-grid-precision);

		// calculate the width of one grid column
		@spartan-one-col: (@spartan-width / @cols);

		// implement grid mixins with type dependent variables
		.spartan-grid > .spartan-grid-mixins(@spartan-width, @spartan-row-gutter, @spartan-col-gutter, @spartan-one-col);
	}

	// mixin for fluid grid and fixed gutter
	.spartan-create('fluid', 'fixed', @fixed-width, @fixed-gutter, @cols) {
		@spartan-width: 100%;

		// calculate the width of one grid column
		@spartan-one-col: (@spartan-width / @cols);

		// implement grid mixins with type dependent variables
		.spartan-grid > .spartan-grid-mixins(@spartan-width, @fixed-gutter, @fixed-gutter, @spartan-one-col);
	}

	// only one mixin for fixed grid needed because we cannot make fluid gutters in static grid
	.spartan-create('fixed', @gutter-type, @fixed-width, @fixed-gutter, @cols) {
		// calculate the width of one grid column
		@spartan-one-col: ((@fixed-width + @fixed-gutter) / @cols);

		// implement grid mixins with type dependent variables
		.spartan-grid > .spartan-grid-mixins(@fixed-width, @fixed-gutter, @fixed-gutter, @spartan-one-col);
	}

	// call switch mixin to calculate variables depending on grid configuration
	.spartan-grid > .spartan-create(@spartan-grid-type, @spartan-grid-gutter-type, @spartan-grid-fixed-width, @spartan-grid-fixed-gutter, @spartan-grid-max-cols);

	// unlock grid mixins with modified variables
	.spartan-grid-mixins(@width, @row-gutter, @col-gutter, @one-col) {
		.spartan-span-width(@num) {
			width: round((@one-col * @num), @spartan-grid-precision);
		}

		// indent grid columns either way with these mixins
		.spartan-indent(@num: 0) {
			margin-left: round((@one-col * @num), @spartan-grid-precision);
		}

		// used only on .col for uniquely applied gutter
		.spartan-col-indent(@num: 0) {
			padding-left: @col-gutter !important;
		}

		// used only on .row for proper negative indents
		.spartan-row-indent(@num: 0) {
			margin-left: -@row-gutter;
		}

		// visually manipulate grid column order with these mixins
		.spartan-push(@num) {
			left: round((@one-col * @num), @spartan-grid-precision);
		}

		.spartan-pull(@num) {
			right: round((@one-col * @num), @spartan-grid-precision);
		}
	}

	// less loop to generate grid classes
	.spartan-loop (@index, @class: item, @mixin: '') when (@index > 0) {
{'fraction_non_alphanumeric': 0.17411904056855196, 'fraction_numerical': 0.003405389398874741, 'mean_word_length': 3.1904466501240694, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '172023', 'n_tokens_mistral': 2398, 'n_tokens_neox': 2116, 'n_words': 610}