File: D:/HostingSpaces/SBogers10/shop.komma.nl/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, 900); // 1
padding: 0; /* 2 */
background-color: transparent; /* 2 */
border: none; /* 2 */
cursor: pointer;
transition: color 150ms;
&:hover:not(:disabled){
color: palette(action, 500);
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
.c-text-button__text {}
.c-text-button__icon {
display: none; // By default icon is hidden
position: relative;
top: -2px;
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
}
}
.c-text-button--small {
.c-text-button__text {
@include font-size(xs);
@include font-weight('medium');
}
.c-text-button__icon svg {
transform: scale(0.67);
}
}