HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/gggg.komma.nl/resources/sass/5-Components/_components.button.scss
// Component settings: Button
// ------------------------------------------

$c-button: (
	'color':			palette(neutral, 0),
	'bgcolor':			palette(secondary, 700),
	'bgcolor-hover':	scale-color(palette(secondary, 700), $lightness: -10%),
);

// ------------------------------------------


.c-button {
	@include border-radius(m);
	@include font-size(xs);
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: map-get($c-button, 'color');
	background-color: map-get($c-button, 'bgcolor');
	background-image: linear-gradient(145deg, palette(secondary, 700) 50%, palette(secondary, 500) 125%);
	text-shadow: 0 0 4px rgba(0,0,0,0.2);
	border: none;
	padding: space(2) 0;
	text-transform: uppercase;
	position: relative;
	overflow: hidden;
	cursor: pointer;
	text-decoration: none;

	&:focus {
		outline: none;
		box-shadow: 0 0 0 1px palette(neutral, 0), 0 0 5px 2px map-get($c-button, 'bgcolor');
	}
	&:active:not(:disabled) {
		outline: none;
		box-shadow: none;
	}
	&:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}

	// Pseudo element for animating hover
	&::after {
		content: "";
		position: absolute;
		z-index: 1;
		top: calc(50% - 2px);
		left: calc(50% - 2px);
		width: 4px;
		height: 4px;
		opacity: 0;
		border-radius: 50%;
		background: map-get($c-button, 'bgcolor-hover');
		pointer-events: none;
		transition-property: opacity, transform;
		transition-duration: 0.5s;
	}

	&:hover:not(:disabled)::after {
		opacity: 1;
		transform: scale(100);
	}
}

.c-button__text {
	position: relative;
	z-index: 2;
	padding: 0 space(3);
	text-align: center;

	.c-button--icon & {
		padding-right: space(2);
	}
}

.c-button__icon {
	display: none; // By default icon is hidden
	position: relative;
	z-index: 2;
	top: -1px;
	margin-right: 15px;
	transition: transform 0.3s;

	.c-button:hover:not(:disabled) & {
		transform: translateX(3px);
	}

	// When icon comes before the text (in the DOM) switch the margin
	&:first-child {
		margin-right: 0;
		margin-left: 15px;
	}

	.c-button--icon & {
		display: block; // Show when has icon modifier
		width: 16px;
	}
}