<commit_before>/** Calculate luma as it is also used in OCA\Theming\Util::calculateLuma */
@function luma($c) {
	$-local-red: red(rgba($c, 1.0));
	$-local-green: green(rgba($c, 1.0));
	$-local-blue: blue(rgba($c, 1.0));

	@return (0.2126 * $-local-red  + 0.7152 * $-local-green + 0.0722 * $-local-blue) / 255;
}

$has-custom-logo: variable_exists('theming-logo-mime') and $theming-logo-mime != '';
$invert: luma($color-primary) > 0.6;

@if ($has-custom-logo == false) {
	@if ($invert) {
		$image-logo: url(icon-color-path('logo', 'logo', #000000, 1, true));
	} @else {
		$image-logo: url(icon-color-path('logo', 'logo', #ffffff, 1, true));
	}
}

.nc-theming-main-background {
	background-color: $color-primary;
}

.nc-theming-main-text {
	color: $color-primary-text;
}

.nc-theming-contrast {
	color: $color-primary-text;
}

@if ($invert) {
	#appmenu:not(.inverted) svg {
		filter: invert(1);
	}
	#appmenu.inverted svg {
		filter: none;
	}
	.searchbox input[type="search"] {
		background-repeat: no-repeat;
		background-position: 6px center;
		background-color: transparent;
		@include icon-color('search', 'actions', $color-black, 1, true);
	}
	#contactsmenu .icon-contacts {
		@include icon-color('contacts', 'places', $color-black, 1, true);
	}
	#settings .icon-settings-white {
		@include icon-color('settings', 'actions', $color-black, 1, true);
	}
	#appmenu .icon-more-white {
		@include icon-color('more', 'actions', $color-black, 1, true);
	}

	#body-login {

		input,
		#alternative-logins li a {
			border: 1px solid nc-lighten($color-primary-text, 50%);
		}
		input.primary,
		button.primary,
		#alternative-logins li a {
			background-color: $color-primary;
			color: $color-primary-text;
		}
		a,
		label,
		p,
		#alternative-logins legend,
		.lost-password-container #lost-password {
			color: $color-primary-text;
		}
		input[type='checkbox'].checkbox--white + label:before {
			border-color: nc-darken($color-primary-element, 40%) !important;
		}
		input[type='checkbox'].checkbox--white:not(:disabled):not(:checked) + label:hover:before,
		input[type='checkbox'].checkbox--white:focus + label:before {
			border-color: nc-darken($color-primary-element, 30%) !important;
		}
		input[type='checkbox'].checkbox--white:checked + label:before {
			border-color: nc-darken($color-primary-element, 30%) !important;
			background-color: nc-darken($color-primary-element, 30%) !important;<commit_msg>Fix dark text in body-login box on light theming colors<commit_after>/** Calculate luma as it is also used in OCA\Theming\Util::calculateLuma */
@function luma($c) {
	$-local-red: red(rgba($c, 1.0));
	$-local-green: green(rgba($c, 1.0));
	$-local-blue: blue(rgba($c, 1.0));

	@return (0.2126 * $-local-red  + 0.7152 * $-local-green + 0.0722 * $-local-blue) / 255;
}

$has-custom-logo: variable_exists('theming-logo-mime') and $theming-logo-mime != '';
$invert: luma($color-primary) > 0.6;

@if ($has-custom-logo == false) {
	@if ($invert) {
		$image-logo: url(icon-color-path('logo', 'logo', #000000, 1, true));
	} @else {
		$image-logo: url(icon-color-path('logo', 'logo', #ffffff, 1, true));
	}
}

.nc-theming-main-background {
	background-color: $color-primary;
}

.nc-theming-main-text {
	color: $color-primary-text;
}

.nc-theming-contrast {
	color: $color-primary-text;
}

@if ($invert) {
	#appmenu:not(.inverted) svg {
		filter: invert(1);
	}
	#appmenu.inverted svg {
		filter: none;
	}
	.searchbox input[type="search"] {
		background-repeat: no-repeat;
		background-position: 6px center;
		background-color: transparent;
		@include icon-color('search', 'actions', $color-black, 1, true);
	}
	#contactsmenu .icon-contacts {
		@include icon-color('contacts', 'places', $color-black, 1, true);
	}
	#settings .icon-settings-white {
		@include icon-color('settings', 'actions', $color-black, 1, true);
	}
	#appmenu .icon-more-white {
		@include icon-color('more', 'actions', $color-black, 1, true);
	}

	#body-login {

		input,
		#alternative-logins li a {
			border: 1px solid nc-lighten($color-primary-text, 50%);
		}
		input.primary,
		button.primary,
		#alternative-logins li a {
			background-color: $color-primary;
			color: $color-primary-text;
		}
		a,
		label,
		footer p,
		#alternative-logins legend,
		.lost-password-container #lost-password {
			color: $color-primary-text;
		}
		input[type='checkbox'].checkbox--white + label:before {
			border-color: nc-darken($color-primary-element, 40%) !important;
		}
		input[type='checkbox'].checkbox--white:not(:disabled):not(:checked) + label:hover:before,
		input[type='checkbox'].checkbox--white:focus + label:before {
			border-color: nc-darken($color-primary-element, 30%) !important;
		}
		input[type='checkbox'].checkbox--white:checked + label:before {
			border-color: nc-darken($color-primary-element, 30%) !important;
			background-color: nc-darken($color-primary-element, 30%) !important;
{'fraction_non_alphanumeric': 0.19260020554984583, 'fraction_numerical': 0.020966084275436794, 'mean_word_length': 4.221030042918455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3840378', 'n_tokens_mistral': 1996, 'n_tokens_neox': 1798, 'n_words': 337}