<commit_before>/**
 * @package   Flexy-plexy grid system
 * @author    <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2015, <NAME>
 * @license   MIT License, see license.txt
 */
@mixin flexy-plexy($options, $rows...) {
	@at-root (without: media) {
		display           : flex;
		display           : -ms-flexbox;
		display           : -webkit-flex;
		flex-wrap         : wrap;
		-ms-flex-wrap     : wrap;
		-webkit-flex-wrap : wrap;

		> :not(template):not(script):not(style) {
			box-sizing : border-box !important;
		}
	}

	$items-counter : 0;
	$gutter-width : nth($options, 1);
	$include-selector : 'nth-of-type';
	$exclude-selector : ':not(template):not(script):not(style)';

	@if length($options) > 1 and nth($options, 2) == child {
		$include-selector : 'nth-child';
	}

	@each $row-columns in $rows {
		$columns-in-row : length($row-columns);
		$index : 1;
		$index-offset : $items-counter;
		$offset-selector : '';
		$total-row-width : 0;

		@each $grow in $row-columns {
			$total-row-width : $total-row-width + $grow;
			$offset-selector : $offset-selector + ' ~ ' + $exclude-selector;
		}

		@each $column-width in $row-columns {
			$flex-width : $column-width + ' / ' + $total-row-width + ' * 100%';
			$margin-right : 0;

			@if $index != $columns-in-row {
				$flex-width : $flex-width + ' - ' + $gutter-width;
				$margin-right : $gutter-width;
			}

			$flex-width : #{'calc(' + $flex-width + ')'};

			> #{$exclude-selector + ':' + $include-selector + '(' + $columns-in-row + 'n + ' + ($index-offset + $index) + ')'} {
				margin-right : $margin-right;
				width        : $flex-width;

				// This ugly `if` can be replaced with simple `display: if($column-width > 0, initial, none)`, but stupid IE doesn't understand `initial`...
				@if $column-width == 0 {
					&:not(#{':' + $include-selector + '(' + $columns-in-row + 'n + ' + ($index-offset + $index + $columns-in-row) + ')'}) {
						display : none;
					}
				}
			}

			$index : $index + 1;
			$items-counter : $items-counter + 1;
		}
	}

	> #{$exclude-selector + ':' + $include-selector + '(' + 'n + ' + (length(nth($rows, 1)) + 1) + ')'} {
		margin-top : $gutter-width;
	}
}<commit_msg>Gutter with width `0` (without units) causes issues, so lets correct `0` to `0px` under the hood<commit_after>/**
 * @package   Flexy-plexy grid system
 * @author    <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2015, <NAME>
 * @license   MIT License, see license.txt
 */
@mixin flexy-plexy($options, $rows...) {
	@at-root (without: media) {
		display           : flex;
		display           : -ms-flexbox;
		display           : -webkit-flex;
		flex-wrap         : wrap;
		-ms-flex-wrap     : wrap;
		-webkit-flex-wrap : wrap;

		> :not(template):not(script):not(style) {
			box-sizing : border-box !important;
		}
	}

	$items-counter : 0;
	$gutter-width : nth($options, 1);
	$include-selector : 'nth-of-type';
	$exclude-selector : ':not(template):not(script):not(style)';

	@if ($gutter-width == 0) {
		$gutter-width : 0px;
	}

	@if length($options) > 1 and nth($options, 2) == child {
		$include-selector : 'nth-child';
	}

	@each $row-columns in $rows {
		$columns-in-row : length($row-columns);
		$index : 1;
		$index-offset : $items-counter;
		$offset-selector : '';
		$total-row-width : 0;

		@each $grow in $row-columns {
			$total-row-width : $total-row-width + $grow;
			$offset-selector : $offset-selector + ' ~ ' + $exclude-selector;
		}

		@each $column-width in $row-columns {
			$flex-width : $column-width + ' / ' + $total-row-width + ' * 100%';
			$margin-right : 0;

			@if $index != $columns-in-row {
				$flex-width : $flex-width + ' - ' + $gutter-width;
				$margin-right : $gutter-width;
			}

			$flex-width : #{'calc(' + $flex-width + ')'};

			> #{$exclude-selector + ':' + $include-selector + '(' + $columns-in-row + 'n + ' + ($index-offset + $index) + ')'} {
				margin-right : $margin-right;
				width        : $flex-width;

				// This ugly `if` can be replaced with simple `display: if($column-width > 0, initial, none)`, but stupid IE doesn't understand `initial`...
				@if $column-width == 0 {
					&:not(#{':' + $include-selector + '(' + $columns-in-row + 'n + ' + ($index-offset + $index + $columns-in-row) + ')'}) {
						display : none;
					}
				}
			}

			$index : $index + 1;
			$items-counter : $items-counter + 1;
		}
	}

	> #{$exclude-selector + ':' + $include-selector + '(n + ' + (length(nth($rows, 1)) + 1) + ')'} {
		margin-top : $gutter-width;
	}
}
{'fraction_non_alphanumeric': 0.2090725353694139, 'fraction_numerical': 0.010105546822366944, 'mean_word_length': 2.7334450963956414, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, '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': '4579096', 'n_tokens_mistral': 1879, 'n_tokens_neox': 1635, 'n_words': 335}