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/csb.komma.pro/resources/sass/5-Components/_components.textButton.scss
/* ==========================================================================
 * Text button
 * ========================================================================== */

/**
 * 1. Color gets inherited and used for nested elements with 'currentColor' property
 * 2. Reset default button styling
 */

.c-text-button {
	display: inline-flex;
	align-items: center;
	color: palette(neutral, 800); // 1
	padding: 0; /* 2 */
	background-color: transparent; /* 2 */
	border: none; /* 2 */
	cursor: pointer;
	text-decoration: none;
	transition: color 0.3s;

	&:hover:not(:disabled){
		color: scale_color(palette(neutral, 800), $lightness: 40%);
	}
	&:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}
}

.c-text-button__text {
	@include font-size(m);
	@include font-weight(medium);
}

.c-text-button__icon {
	display: none; // By default icon is hidden
	position: relative;
	top: 1px;
	margin-left: space(1);
	transition: transform 0.3s;

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

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


// Smaller text button modifier
.c-text-button--small {
	color: palette(neutral, 400);

	& .c-text-button__text {
		@include font-size(s);
		@include font-weight(regular);
	}

	& .c-text-button__icon {
		top: 0;
	}
}