<commit_before>
//
// Grid
// --------------------------------------------------

$base-container-columns: map-get(map-get($breakpoint-map, base), container-columns);
$base-gutter:            map-get(map-get($breakpoint-map, base), gutter);
$base-max-width:         map-get(map-get($breakpoint-map, base), max-width);

@mixin container($max-width: $base-max-width) {
	
	// Default Base max-width
	max-width: $max-width;

	// Loop through responsive breakpoints and set max-width
	@each $breakpoint, $map in $breakpoint-map {
			
		@if ($breakpoint != 'base') {
			$max-width: map-get($map, max-width);

			@include respond-to($breakpoint) {

				@if ($max-width) {
					max-width: $max-width;
				} @else {
					// If max-width not specified use 100%;
					max-width: 100%;
				}
			}
		}
	}

	@include clearfix;
	margin: {
		left: auto;
		right: auto;
  	}
}

@mixin build-column($columns, $container-columns, $offset, $gutter) {

		display: block;
		float: left;

	@if ($gutter == 0) {
		width: percentage($columns / $container-columns);
		margin-left: percentage($offset / $container-columns);
		margin-right: 0;
	}
	@else {
		width: percentage($columns / $container-columns) - $gutter * 2;
		margin-left: percentage($offset / $container-columns) + $gutter;
		margin-right: $gutter;
	}
}

@mixin columns($columns: $base-container-columns, $offset: 0, $gutter: $base-gutter) {
	
	// Build default Base columns
	@include build-column($columns, $base-container-columns, $offset, $gutter);
	
	// Loop through responsive breakpoints and build columns
	@each $breakpoint, $map in $breakpoint-map {
		
		@if ($breakpoint != 'base') {
			$container-columns: map-get($map, container-columns);
			
			// Check if gutter was set to 0 
			@if ($gutter != 0) {
				$gutter: map-get($map, gutter);
			}

			@if (($columns + $offset) > $container-columns) {
				$considered-columns: $container-columns;
			} @else {
				$considered-columns: $columns;
			}
			
			@if ($offset >= $considered-columns) {
				$offset: 0;
			}

			@include respond-to($breakpoint) {
				
				@if ($gutter != 0) {
					$gutter: $gutter;
				}
				@include build-column($considered-columns, $container-columns, $offset, $gutter);
			}
		}
	}
}


@mixin responsive-columns($breakpoint, $columns, $offset: 0) {
	
	$container-columns: map-get(map-get($breakpoint-map, $breakpoint), container-columns);

	@include respond-to($breakpoint) {

		$gutter: map-get(map-get($breakpoint-map, $breakpoint), gutter);

		@include build-column($columns, $container-columns, $offset, $gutter);
	}
	
}

// Breakpoints
// --------------------------------------------------

@mixin respond-to($breakpoint) {
	@if map-has-key($breakpoints, $breakpoint) {
		@media #{inspect(map-get($breakpoints, $breakpoint))} {
			@content;
		}
	}

	@else {
		@error 'No value found for `#{$breakpoint}`. '<commit_msg>columns - allow to overwrite gutter with % value not just 0<commit_after>//
// Grid
// --------------------------------------------------

$base-container-columns: map-get(map-get($breakpoint-map, base), container-columns);
$base-gutter:            map-get(map-get($breakpoint-map, base), gutter);
$base-max-width:         map-get(map-get($breakpoint-map, base), max-width);

@mixin container($max-width: $base-max-width) {
	
	// Default Base max-width
	max-width: $max-width;

	// Loop through responsive breakpoints and set max-width
	@each $breakpoint, $map in $breakpoint-map {
			
		@if ($breakpoint != 'base') {
			$max-width: map-get($map, max-width);

			@include respond-to($breakpoint) {

				@if ($max-width) {
					max-width: $max-width;
				} @else {
					// If max-width not specified use 100%;
					max-width: 100%;
				}
			}
		}
	}

	@include clearfix;
	margin: {
		left: auto;
		right: auto;
  	}
}

@mixin build-column($columns, $container-columns, $offset, $gutter) {

		display: block;
		float: left;

	@if ($gutter == 0) {
		width: percentage($columns / $container-columns);
		margin-left: percentage($offset / $container-columns);
		margin-right: 0;
	}
	@else {
		width: percentage($columns / $container-columns) - $gutter * 2;
		margin-left: percentage($offset / $container-columns) + $gutter;
		margin-right: $gutter;
	}
}

@mixin columns($columns: $base-container-columns, $offset: 0, $gutter: null) {
	
	@if $gutter == null {
	    $gutter: $base-gutter;
	}
	
	// Default Base columns
	@include build-column($columns, $base-container-columns, $offset, $gutter);
	
	// Loop through responsive breakpoints and build columns
	@each $breakpoint, $map in $breakpoint-map {
		
		@if ($breakpoint != 'base') {
			$container-columns: map-get($map, container-columns);
			
			// Check if gutter was set to 0 
			@if ($gutter == null) {
				$considered-gutter: map-get($map, gutter);
			} @else {
				$considered-gutter: $gutter;
			}

			@if (($columns + $offset) > $container-columns) {
				$considered-columns: $container-columns;
			} @else {
				$considered-columns: $columns;
			}
			
			@if ($offset >= $considered-columns) {
				$offset: 0;
			}

			@include respond-to($breakpoint) {
				
				@if ($gutter != 0) {
					$gutter: $gutter;
				}
				@include build-column($considered-columns, $container-columns, $offset, $considered-gutter);
			}
		}
	}
}


@mixin responsive-columns($breakpoint, $columns, $offset: 0) {
	
	$container-columns: map-get(map-get($breakpoint-map, $breakpoint), container-columns);

	@include respond-to($breakpoint) {

		$gutter: map-get(map-get($breakpoint-map, $breakpoint), gutter);

		@include build-column($columns, $container-columns, $offset, $gutter);
	}
	
}

// Breakpoints
// --------------------------------------------------

@mixin respond-to($breakpoint) {
	@if map-has-key($breakpoints, $breakpoint) {
		@media #{inspect(map-get($breakpoints, $breakpoint))} {
			@content;
		}
	}

	@else {
		@error 'No value found for `#{$breakpoint}`. '
{'fraction_non_alphanumeric': 0.20345063204646396, 'fraction_numerical': 0.005124701059104886, 'mean_word_length': 2.921634293369056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6493176', 'n_tokens_mistral': 2306, 'n_tokens_neox': 1966, 'n_words': 424}