<commit_before>.switch {
	margin: .25rem 0;
	position: relative;
}

.switch-input {
	opacity: 0;
	pointer-events: none;
	position: absolute;
}

.switch-label {
	color: _color("text.light");
	cursor: pointer;
	display: inline-block;
	padding: 0 0 0 2.7rem;
	transition: color 150ms ease;

	&::before {
		background: #BBBBBB;
		border-radius: 10px;
		content: "";
		display: block;
		height: 16px;
		left: 0;
		position: absolute;
		top: 4px;
		transition: all 150ms ease;
		width: 32px;
	}

	&::after {
		background: white;
		border-radius: 50%;
		box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
		content: "";
		display: block;
		height: 20px;
		left: -2px;
		position: absolute;
		top: 2px;
		transition: all 150ms ease;
		width: 20px;
	}
}


// PALETTE
// ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

.switch {
	@mixin switchColoring($palette) {
		.switch-input:checked ~ .switch-label {
			&::before {
				background: lighten(_get($palette, "color"), 20%);
			}

			&::after {
				background: _get($palette, "color");
			}
		}
	}

	// default color
	@include switchColoring(_component("switch.default-palette"));

	// palette colors
	@each $name, $palette in _palettes() {
		&.palette-#{$name} {
			@include switchColoring($palette);
		}
	}
}


// STATES
// ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

.switch .switch-input {

	/*
		Checked
	*/

	&:checked ~ .switch-label {
		color: _color("text.default");

		&::after {
			left: 14px;
		}
	}

	/*
		Disabled
	*/

	&[disabled], &[readonly] {
		~ .switch-label {
			color: _color("text.light");
			cursor: not-allowed;

			&::before {
				background: lighten(_color("text.light"), 25%);
			}
			&::after {
				background: lighten(_color("text.light"), 15%);
			}
		}
	}
}
<commit_msg>[enh] switch disabled color<commit_after>.switch {
	margin: .25rem 0;
	position: relative;
}

.switch-input {
	opacity: 0;
	pointer-events: none;
	position: absolute;
}

.switch-label {
	color: _color("text.light");
	cursor: pointer;
	display: inline-block;
	padding: 0 0 0 2.7rem;
	transition: color 150ms ease;

	&::before {
		background: #BBBBBB;
		border-radius: 10px;
		content: "";
		display: block;
		height: 16px;
		left: 0;
		position: absolute;
		top: 4px;
		transition: all 150ms ease;
		width: 32px;
	}

	&::after {
		background: white;
		border-radius: 50%;
		box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
		content: "";
		display: block;
		height: 20px;
		left: -2px;
		position: absolute;
		top: 2px;
		transition: all 150ms ease;
		width: 20px;
	}
}


// STATES
// ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

.switch .switch-input {

	/*
		Checked
	*/

	&:checked ~ .switch-label {
		color: _color("text.default");

		&::after {
			left: 14px;
		}
	}

	/*
		Disabled
	*/

	&[disabled], &[readonly] {
		~ .switch-label {
			color: _color("text.light");
			cursor: not-allowed;

			&::before {
				background: lighten(_color("text.light"), 25%);
			}
			&::after {
				background: lighten(_color("text.light"), 15%);
			}
		}
	}
}


// PALETTE
// ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

.switch {
	@mixin switchColoring($palette) {
		.switch-input:checked {
			~ .switch-label {
				&::before {
					background: lighten(_get($palette, "color"), 20%);
				}

				&::after {
					background: _get($palette, "color");
				}
			}

			// Palette > Disabled switch 
			&[disabled], &[readonly]{
				&:checked {
					~ .switch-label {
						&::before {
							background: desaturate( lighten(_get($palette, "color"), 30%), 15%);
						}

						&::after {
							background: desaturate( lighten(_get($palette, "color"), 20%), 15%);
						}
					}
				}
			}
		}
	}

	// default color
	@include switchColoring(_component("switch.default-palette"));

	// palette colors
	@each $name, $palette in _palettes() {
		&.palette-#{$name} {
			@include switchColoring($palette);
		}
	}
}

{'fraction_non_alphanumeric': 0.22621509824198552, 'fraction_numerical': 0.027404343329886244, 'mean_word_length': 3.1203407880724177, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5897059', 'n_tokens_mistral': 1948, 'n_tokens_neox': 1820, 'n_words': 302}