File: D:/HostingSpaces/Neopoints/momsecurity.be/resources/sass/5-Components/_components.button.scss
/* ==========================================================================
* Default button
* ========================================================================== */
.c-button {
display: inline-flex;
align-items: center;
@include border-radius;
@include font(14, 20, 500);
padding: 11px 0 10px;
background: linear-gradient(90deg, #2F6CE6 0%, #699BFF 50%, #2F6CE6 100%);
background-size: 200%;
color: white;
border: none;
border-radius: 400px;
cursor: pointer;
text-decoration: none;
transition: background 0.3s;
//white-space: nowrap; // TODO Should the text of a button wrap or not?
&:hover:not(:disabled) {
//background-color: scale-color(palette(action), $lightness: -20%);
//background: linear-gradient(90deg, scale-color(#699BFF, $lightness: -20%) 0%, scale-color(#2F6CE6, $lightness: -20%) 100%);
background-position: -100%;
}
&:active:not(:disabled) {
transform: translateY(1px);
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
&:focus {
outline: none;
}
}
.c-button__text {
@include font(18, 22, 500);
padding: 0 25px;
text-align: center;
letter-spacing: 1.5px;
}
.c-button__icon {
display: none; // By default icon is hidden
position: relative;
top: -1px;
left: -4px;
height: 12px;
width: 16px;
margin-right: 15px;
transition: transform 0.3s;
.c-button:hover:not(:disabled) & {
transform: translateX(4px);
}
// When icon comes before the text (in the DOM) switch the margin
&:first-child {
margin-right: 0;
margin-left: 15px;
}
.c-button--icon & {
display: flex;
align-items: center;
}
}
.c-button--text {
border: none;
background: none;
color: #7AD3FF;
&:hover:not(:disabled) {
background: none;
color: palette(text, 600);
}
.c-button__text {
padding-left: 0;
}
}
.c-button--ghost {
padding: 10px 0 9px;
color: palette(text, 400);
background: transparent;
border: 1px solid currentColor;
transition: color 0.3s, border 0.3s;
&:hover:not(:disabled) {
color: scale-color(palette(text, 400), $lightness: -20%);
}
}
.c-button--on-dark {
color: white;
&:hover:not(:disabled) {
color: rgba(white, 0.75);
}
}