71 lines
1.8 KiB
SCSS
71 lines
1.8 KiB
SCSS
//Custom button styles
|
|
.btn {
|
|
&.btn-primary,
|
|
&.btn-primary-focus {
|
|
position: relative;
|
|
background: $blue-700;
|
|
background: linear-gradient(270deg, rgba(21,116,161,1) 0%, rgba(18,91,126,1) 100%);
|
|
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%);
|
|
}
|
|
&.button-loader {
|
|
padding: 0 40px 0 12px;
|
|
&:after {
|
|
content: url(../../assets/img/icons/button-spinner.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;
|
|
background: linear-gradient(270deg, $gray-100 0%, $gray-100 100%);
|
|
color: $gray-400;
|
|
}
|
|
}
|
|
&.btn-primary-focus {
|
|
position: relative;//Required for :after pseduo to position correctly
|
|
margin: 5px;//Because :after is position absolute and isn't accounted for in DOM
|
|
&:before {
|
|
content: "";
|
|
position: absolute;
|
|
width: calc(100% + 12px);
|
|
height: calc(100% + 12px);
|
|
border: 3px solid $blue-700;
|
|
background-color: $white;
|
|
border-radius: 12px;
|
|
left: -6px;
|
|
top: -6px;
|
|
z-index: -1;
|
|
}
|
|
}
|
|
}
|
|
// Non-Bootstrap button
|
|
// Intended to be used without .btn class
|
|
.btn-damage {
|
|
width: 100%;
|
|
background-color: $white;
|
|
border: 1px solid #b3b4b5;
|
|
&:focus {
|
|
background-color: #e7f1f6;
|
|
border: 1px solid $blue;
|
|
}
|
|
&:focus-visible { // For keyboard/screenreader
|
|
background-color: #e7f1f6;
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px $blue;
|
|
}
|
|
}
|