151 lines
3.7 KiB
SCSS
151 lines
3.7 KiB
SCSS
//Custom button styles
|
|
.btn {
|
|
&.btn-primary {
|
|
position: relative;
|
|
background: $blue-700;
|
|
@include blue-gradient;
|
|
border: none;
|
|
border-radius: $border-radius-lg;
|
|
height: 48px;
|
|
color: $white;
|
|
transition: all 150ms linear;
|
|
&:hover {
|
|
background: linear-gradient(270deg, rgba(6,87,124,1) 0%, rgba(6,87,124,1) 100%);
|
|
}
|
|
&:focus, // Mouse, touch, stylus focus
|
|
&:focus-visible { // Keyboard focus for accessibility
|
|
outline: none;
|
|
box-shadow: 0 0 0 3px, 0 0 0 5.5px $blue-700;
|
|
}
|
|
&.button-loader {
|
|
padding: 0 40px 0 12px;
|
|
&:after {
|
|
content: url(../../assets/img/icons/button-spinner-white.svg);
|
|
position: absolute;
|
|
right: 14px;
|
|
width: 16px;
|
|
height: 16px;
|
|
margin-left: 12px;
|
|
animation: rotation 1s infinite linear;
|
|
@keyframes rotation {
|
|
100% {
|
|
transform:rotate(360deg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
&:disabled {
|
|
background: $gray-100 !important;
|
|
background: linear-gradient(270deg, $gray-100 0%, $gray-100 100%) !important;
|
|
color: $gray !important;
|
|
height: 48px;
|
|
border: none;
|
|
border-radius: $border-radius-lg;
|
|
}
|
|
}
|
|
&.btn-secondary {
|
|
position: relative;
|
|
background: transparent;
|
|
border: 1px solid $blue;
|
|
border-radius: $border-radius-lg;
|
|
height: 48px;
|
|
color: $blue;
|
|
transition: all 150ms linear;
|
|
&:hover {
|
|
color: $white;
|
|
@include blue-gradient;
|
|
}
|
|
&:focus, // Mouse, touch, stylus focus
|
|
&:focus-visible { // Keyboard focus for accessibility
|
|
outline: none;
|
|
box-shadow: 0 0 0 3px $white, 0 0 0 5.5px $blue-700;
|
|
}
|
|
&.button-loader {
|
|
padding: 0 40px 0 12px;
|
|
&:after {
|
|
content: url(../../assets/img/icons/button-spinner-blue.svg);
|
|
position: absolute;
|
|
right: 14px;
|
|
width: 16px;
|
|
height: 16px;
|
|
margin-left: 12px;
|
|
animation: rotation 1s infinite linear;
|
|
@keyframes rotation {
|
|
100% {
|
|
transform:rotate(360deg);
|
|
}
|
|
}
|
|
}
|
|
&:focus:hover {
|
|
&:after {
|
|
content: url(../../assets/img/icons/button-spinner-white.svg);
|
|
position: absolute;
|
|
right: 14px;
|
|
width: 16px;
|
|
height: 16px;
|
|
margin-left: 12px;
|
|
animation: rotation 1s infinite linear;
|
|
@keyframes rotation {
|
|
100% {
|
|
transform:rotate(360deg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
&:disabled {
|
|
background: transparent;
|
|
color: $gray !important;
|
|
height: 48px;
|
|
border: 1px solid $gray-300;
|
|
border-radius: $border-radius-lg;
|
|
}
|
|
}
|
|
&.list-button {
|
|
position: relative;
|
|
background: $white;
|
|
height: 48px;
|
|
transition: all 150ms linear;
|
|
border-radius: $border-radius-lg;
|
|
border: 1px solid $gray-500;
|
|
width: 100%;
|
|
&:hover {
|
|
box-shadow: 0 0 0 4px $blue-100;
|
|
}
|
|
&:focus, // Mouse, touch, stylus focus
|
|
&:focus-visible { // Keyboard focus for accessibility
|
|
box-shadow: 0 0 0 2px $blue;
|
|
}
|
|
&:active {
|
|
background: $blue-100;
|
|
border: 1px solid $blue;
|
|
}
|
|
+ label {
|
|
display: none;
|
|
}
|
|
&.error {
|
|
border: 1px solid $danger;
|
|
~ label {
|
|
display: flex;
|
|
color: $danger;
|
|
}
|
|
}
|
|
&.button-loader {
|
|
padding: 0 40px 0 12px;
|
|
&:after {
|
|
content: url(../../assets/img/icons/button-spinner-blue.svg);
|
|
position: absolute;
|
|
right: 14px;
|
|
width: 16px;
|
|
height: 16px;
|
|
margin-left: 12px;
|
|
animation: rotation 1s infinite linear;
|
|
@keyframes rotation {
|
|
100% {
|
|
transform:rotate(360deg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|