File: D:/HostingSpaces/stafa/stafa.nl/resources/sass/site/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-textbutton {
@include font-weight(medium);
display: inline-flex;
align-items: center;
color: palette(action, 500); // 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(action, 500), $lightness: -20%);
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
.c-textbutton--on-dark {
color: palette(action, 300);
&:hover:not(:disabled){
color: scale_color(palette(action, 300), $lightness: 20%);
}
}
.c-textbutton--is-reversed {
flex-direction: row-reverse;
}
.c-textbutton__icon {
display: none; // By default icon is hidden
position: relative;
margin-left: 11px;
transition: transform 0.3s;
transform: rotate(-0.25turn) translateX(-1px);
.c-textbutton:hover:not(:disabled) & {
transform: rotate(-0.25turn) translateY(4px) translateX(-1px);
}
.c-textbutton--icon & {
display: block; // Show when has icon modifier
}
.c-textbutton--is-reversed & {
margin-left: 0;
margin-right: 11px;
transform: rotate(0.25turn) translateX(1px);
}
.c-textbutton--is-reversed:hover:not(:disabled) & {
transform: rotate(0.25turn) translateY(4px) translateX(1px);
}
}