<commit_before>@mixin paginate($n, $wrap: true, $scroll-full-page: true) {
	> .slides > li {width: 100% / $n}

	> .arrows > label {
		display: none; // Hide all arrows by default
	}

	> .dots > label {
		@if $scroll-full-page { // Show only one dot per page
			display: none; // Hide all dots

			&:last-of-type, // The last page, the leftmost slide for all other pages (below)
			&:nth-of-type(#{$n}n-#{$n - 1}):not(:nth-last-of-type(-n+#{$n})) {
				display: inline;
			}
		} @else { // Hide dots for non left-most slides on last page
			&:nth-last-of-type(-n+#{$n - 1}) {
				display: none;
			}
		}
	}
	> input:nth-last-of-type(#{$n}):checked ~ .dots > label:last-of-type:before {
		opacity: 1;
	}

	// For all possible checked radios
	// Loop indices are 0-based, :nth-x selectors are 1-based, take care
	@for $i from 0 to $css-slider-max-slides {
		> input:nth-of-type(#{$i + 1}):checked {
			//TODO Highlight current dot

			@if $wrap {
				// Left arrow on first page, goes to last slide
				&:nth-of-type(-n+#{$n}) ~ .arrows:not(.right) > label:last-child {
					display: block;
				}

				// Right arrow on last page, goes to first slide
				&:nth-last-of-type(-n+#{$n}) {
					~ .arrows:not(.left) > label:first-child {
						display: block;
					}
				}
			}

			@if $scroll-full-page and $n > 1 {
				// Left arrow on standard pages
				@if $i >= $n {
					~ .arrows:not(.right) > label:nth-of-type(#{($i - $i % $n) - $n + 1}) {
						display: block;
					}
				}

				// Right arrow on standard pages
				~ .arrows:not(.left) > label:nth-of-type(#{($i - $i % $n) + $n + 1}) {
					&:not(:nth-last-of-type(-n+#{$n})) {
						display: block;
					}
				}

				// Right arrow to last page
				&:nth-last-of-type(n+#{$n + 1}):nth-last-of-type(-n+#{$n * 2}) {
					~ .arrows:not(.left) > label:last-child {
						display: block;
					}
				}

				// Current dot
				~ .dots > label:nth-of-type(#{$i - $i % $n + 1})::before,
				&:last-of-type ~ .dots > label:last-of-type::before {
					opacity: 1;
				}

				// Slide the slides
				// For radios on all pages except the last
				&:not(:nth-last-of-type(-n+#{$n})) {
					// Slide left by full page-widths
					~ .slides > li {
						transform: translate3d(($i - $i % $n) * -100%, 0, 0);
					}
				}

				// For each radio on the last page
				@for $j from 0 to $n { // Nested loop! Keep this short
					&:nth-last-of-type(#{$n - $j}) {
						// Slide to the last page
						~ .slides > li {
							// Slide #{$i - $j} is always the left-most slide on the last page
							transform: translate3d(($i - $j) * -100%, 0, 0);
						}
					}
				}

			} @else { // Scroll by only one item
				// Left arrow
				@if $i > 0 {
					~ .arrows:not(.right) > label:nth-of-type(#{$i}) {
						display: block;
					}
				}

				// Right arrow
				&:not(:nth-last-of-type(-n+#{$n})) ~ .arrows:not(.left) > label:nth-of-type(#{$i + 2}) {
					display: block;
				}

				// Current dot
				~ .dots label:nth-of-type(#{$i + 1 })::before {
					opacity: 1;
				}

				// Slide the slides
				// FIXME Do not slide the last page further left if one of the last $n - 1 radios is checked
				~ .slides > li {
					transform: translate3d($i * -100%, 0, 0);
				}
			}
		}
	}
}<commit_msg>paginate: Fix several `$scroll-page-wise: false` bugs<commit_after>@mixin paginate($n, $wrap: true, $scroll-full-page: true) {
	> .slides > li {width: 100% / $n}

	> .arrows > label {
		display: none; // Hide all arrows by default
	}

	> .dots > label {
		@if $scroll-full-page { // Show only one dot per page
			display: none; // Hide all dots

			&:last-of-type, // The last page, the leftmost slide for all other pages (below)
			&:nth-of-type(#{$n}n-#{$n - 1}):not(:nth-last-of-type(-n+#{$n})) {
				display: inline;
			}
		} @else { // Hide dots for non left-most slides on last page
			&:nth-last-of-type(-n+#{$n - 1}) {
				display: none;
			}
		}
	}
	> input:nth-last-of-type(#{$n}):checked ~ .dots > label:last-of-type:before {
		opacity: 1;
	}

	// For all possible checked radios
	// Loop indices are 0-based, :nth-x selectors are 1-based, take care
	@for $i from 0 to $css-slider-max-slides {
		> input:nth-of-type(#{$i + 1}):checked {
			//TODO Highlight current dot

			@if $wrap {
				// Left arrow on first page, goes to last slide
				@if $scroll-full-page {
					&:nth-of-type(-n+#{$n}) {
						~ .arrows:not(.right) > label:last-child {
							display: block;
						}
					}
				} @else {
					&:first-of-type {
						~ .arrows:not(.right) > label:last-child {
							display: block;
						}
					}
				}

				// Right arrow on last page, goes to first slide
					&:nth-last-of-type(-n+#{$n}) {
						~ .arrows:not(.left) > label:first-child {
							display: block;
						}
					}
			}

			@if $scroll-full-page and $n > 1 {
				// Left arrow on standard pages
				@if $i >= $n {
					~ .arrows:not(.right) > label:nth-of-type(#{($i - $i % $n) - $n + 1}) {
						display: block;
					}
				}

				// Right arrow on standard pages
				~ .arrows:not(.left) > label:nth-of-type(#{($i - $i % $n) + $n + 1}) {
					&:not(:nth-last-of-type(-n+#{$n})) {
						display: block;
					}
				}

				// Right arrow to last page
				&:nth-last-of-type(n+#{$n + 1}):nth-last-of-type(-n+#{$n * 2}) {
					~ .arrows:not(.left) > label:last-child {
						display: block;
					}
				}

				// Current dot
				~ .dots > label:nth-of-type(#{$i - $i % $n + 1})::before,
				&:last-of-type ~ .dots > label:last-of-type::before {
					opacity: 1;
				}

				// Slide the slides
				// For radios on all pages except the last
				&:not(:nth-last-of-type(-n+#{$n})) {
					// Slide left by full page-widths
					~ .slides > li {
						transform: translate3d(($i - $i % $n) * -100%, 0, 0);
					}
				}

			} @else { // Scroll by only one item
				// Left arrow
				@if $i > 0 {
					&:not(:nth-last-of-type(-n+#{$n})) {
						~ .arrows:not(.right) > label:nth-of-type(#{$i}) {
							display: block;
						}
					}

					&:nth-last-of-type(-n+#{$n}) {
						~ .arrows:not(.right) > label:nth-last-of-type(#{$n + 1}) {
							display: block;
						}
					}
				}

				// Right arrow
				&:not(:nth-last-of-type(-n+#{$n})) ~ .arrows:not(.left) > label:nth-of-type(#{$i + 2}) {
					display: block;
				}

				// Current dot
				&:not(:nth-last-of-type(-n+#{$n})) {
					~ .dots label:nth-of-type(#{$i + 1 })::before {
						opacity: 1;
					}
				}

				&:nth-last-of-type(-n+#{$n}) {
					~ .dots label:nth-last-of-type(#{$n})::before {
						opacity: 1;
					}
				}

				// Slide the slides
				&:not(:nth-last-of-type(-n+#{$n})) {
					~ .slides > li {
						transform: translate3d($i * -100%, 0, 0);
					}
				}
			}

			// Show last page for any of the last n radios
			@for $j from 0 to $n { // Nested loop! Keep this short
				&:nth-last-of-type(#{$n - $j}) {
					// Slide to the last page
					~ .slides > li {
						// Slide #{$i - $j} is always the left-most slide on the last page
						transform: translate3d(($i - $j) * -100%, 0, 0);
					}
				}
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.2025732666190136, 'fraction_numerical': 0.011865618298784845, 'mean_word_length': 2.001287001287001, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 53, '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': '2087388', 'n_tokens_mistral': 3587, 'n_tokens_neox': 2689, 'n_words': 645}