2019-07-18 14:22:11 +00:00
|
|
|
//
|
|
|
|
// Component: Button
|
|
|
|
//
|
2015-10-31 21:00:16 +00:00
|
|
|
|
|
|
|
.btn {
|
2019-10-29 08:22:51 +00:00
|
|
|
&.disabled,
|
|
|
|
&:disabled {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
|
2015-10-31 21:00:16 +00:00
|
|
|
// Flat buttons
|
|
|
|
&.btn-flat {
|
|
|
|
@include border-radius(0);
|
|
|
|
border-width: 1px;
|
2019-06-28 08:02:07 +00:00
|
|
|
box-shadow: none;
|
2015-10-31 21:00:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// input file btn
|
|
|
|
&.btn-file {
|
|
|
|
overflow: hidden;
|
2019-06-28 08:02:07 +00:00
|
|
|
position: relative;
|
|
|
|
|
2020-05-30 13:06:11 +00:00
|
|
|
> input[type="file"] {
|
2020-06-13 10:22:58 +00:00
|
|
|
background-color: $white;
|
2019-06-28 08:02:07 +00:00
|
|
|
cursor: inherit;
|
|
|
|
display: block;
|
2015-10-31 21:00:16 +00:00
|
|
|
font-size: 100px;
|
2019-06-28 08:02:07 +00:00
|
|
|
min-height: 100%;
|
|
|
|
min-width: 100%;
|
2015-10-31 21:00:16 +00:00
|
|
|
opacity: 0;
|
|
|
|
outline: none;
|
2019-06-28 08:02:07 +00:00
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
text-align: right;
|
|
|
|
top: 0;
|
2015-10-31 21:00:16 +00:00
|
|
|
}
|
|
|
|
}
|
2019-09-17 08:42:32 +00:00
|
|
|
|
|
|
|
.text-sm & {
|
|
|
|
font-size: $font-size-sm !important;
|
|
|
|
}
|
2015-10-31 21:00:16 +00:00
|
|
|
}
|
|
|
|
|
2018-03-17 17:07:55 +00:00
|
|
|
// Button color variations
|
2015-10-31 21:00:16 +00:00
|
|
|
.btn-default {
|
2019-06-14 07:33:43 +00:00
|
|
|
background-color: $button-default-background-color;
|
|
|
|
border-color: $button-default-border-color;
|
2019-06-28 08:02:07 +00:00
|
|
|
color: $button-default-color;
|
|
|
|
|
2015-10-31 21:00:16 +00:00
|
|
|
&:hover,
|
|
|
|
&:active,
|
|
|
|
&.hover {
|
2019-06-14 07:33:43 +00:00
|
|
|
background-color: darken($button-default-background-color, 5%);
|
2019-06-28 08:02:07 +00:00
|
|
|
color: darken($button-default-color, 10%);
|
2015-10-31 21:00:16 +00:00
|
|
|
}
|
2021-05-15 19:01:08 +00:00
|
|
|
|
|
|
|
&.disabled,
|
|
|
|
&:disabled {
|
|
|
|
color: $button-default-color;
|
|
|
|
background-color: $button-default-background-color;
|
|
|
|
}
|
2015-10-31 21:00:16 +00:00
|
|
|
}
|
|
|
|
|
2021-05-15 20:19:39 +00:00
|
|
|
.btn-outline-light {
|
|
|
|
color: darken($light, 20%);
|
|
|
|
border-color: darken($light, 20%);
|
|
|
|
|
|
|
|
&.disabled,
|
|
|
|
&:disabled {
|
|
|
|
color: darken($light, 20%);
|
|
|
|
border-color: darken($light, 20%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-31 21:00:16 +00:00
|
|
|
// Application buttons
|
|
|
|
.btn-app {
|
|
|
|
@include border-radius(3px);
|
2019-06-28 08:02:07 +00:00
|
|
|
background-color: $button-default-background-color;
|
|
|
|
border: 1px solid $button-default-border-color;
|
|
|
|
color: $gray-600;
|
|
|
|
font-size: 12px;
|
|
|
|
height: 60px;
|
2015-10-31 21:00:16 +00:00
|
|
|
margin: 0 0 10px 10px;
|
|
|
|
min-width: 80px;
|
2019-06-28 08:02:07 +00:00
|
|
|
padding: 15px 5px;
|
|
|
|
position: relative;
|
2015-10-31 21:00:16 +00:00
|
|
|
text-align: center;
|
2019-06-28 08:02:07 +00:00
|
|
|
|
2018-04-01 17:35:02 +00:00
|
|
|
// Icons within the btn
|
|
|
|
> .fa,
|
2019-05-25 13:15:32 +00:00
|
|
|
> .fas,
|
|
|
|
> .far,
|
|
|
|
> .fab,
|
2020-07-22 14:50:44 +00:00
|
|
|
> .fal,
|
|
|
|
> .fad,
|
2020-07-24 15:59:40 +00:00
|
|
|
> .svg-inline--fa,
|
2018-04-01 17:35:02 +00:00
|
|
|
> .ion {
|
2015-10-31 21:00:16 +00:00
|
|
|
display: block;
|
2019-06-28 08:02:07 +00:00
|
|
|
font-size: 20px;
|
2015-10-31 21:00:16 +00:00
|
|
|
}
|
|
|
|
|
2020-07-24 15:59:40 +00:00
|
|
|
> .svg-inline--fa {
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
|
2015-10-31 21:00:16 +00:00
|
|
|
&:hover {
|
2020-06-13 10:22:58 +00:00
|
|
|
background-color: $button-default-background-color;
|
2019-06-14 07:33:43 +00:00
|
|
|
border-color: darken($button-default-border-color, 20%);
|
2019-06-28 08:02:07 +00:00
|
|
|
color: $button-default-color;
|
2015-10-31 21:00:16 +00:00
|
|
|
}
|
|
|
|
|
2018-04-01 17:35:02 +00:00
|
|
|
&:active,
|
|
|
|
&:focus {
|
2020-05-30 13:06:11 +00:00
|
|
|
@include box-shadow(inset 0 3px 5px rgba($black, .125));
|
2015-10-31 21:00:16 +00:00
|
|
|
}
|
|
|
|
|
2018-04-01 17:35:02 +00:00
|
|
|
// The badge
|
2015-10-31 21:00:16 +00:00
|
|
|
> .badge {
|
|
|
|
font-size: 10px;
|
|
|
|
font-weight: 400;
|
2019-06-28 08:02:07 +00:00
|
|
|
position: absolute;
|
|
|
|
right: -10px;
|
|
|
|
top: -3px;
|
2015-10-31 21:00:16 +00:00
|
|
|
}
|
|
|
|
}
|
2019-06-19 12:36:36 +00:00
|
|
|
|
2019-08-28 07:26:57 +00:00
|
|
|
// Extra Button Size
|
|
|
|
|
|
|
|
.btn-xs {
|
|
|
|
@include button-size($button-padding-y-xs, $button-padding-x-xs, $button-font-size-xs, $button-line-height-xs, $button-border-radius-xs);
|
|
|
|
}
|
2020-09-23 14:08:15 +00:00
|
|
|
|
2021-04-13 12:24:31 +00:00
|
|
|
@include dark-mode () {
|
2020-09-23 14:08:15 +00:00
|
|
|
.btn-default,
|
|
|
|
.btn-app {
|
|
|
|
background-color: lighten($dark, 2.5%);
|
|
|
|
color: $white;
|
|
|
|
border-color: $gray-600;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
background-color: lighten($dark, 5%);
|
|
|
|
color: $gray-300;
|
|
|
|
border-color: lighten($gray-600, 2.5%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.btn-light {
|
|
|
|
background-color: lighten($dark, 7.5%);
|
|
|
|
color: $white;
|
|
|
|
border-color: $gray-600;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
background-color: lighten($dark, 10%);
|
|
|
|
color: $gray-300;
|
|
|
|
border-color: lighten($gray-600, 5%);
|
|
|
|
}
|
|
|
|
}
|
2021-03-09 19:44:26 +00:00
|
|
|
|
|
|
|
@each $color, $value in $theme-colors-alt {
|
|
|
|
.btn-#{$color} {
|
2021-05-15 20:19:39 +00:00
|
|
|
@if $color == dark {
|
|
|
|
@include button-variant(darken($value, 5%), lighten($value, 10%));
|
|
|
|
} @else {
|
|
|
|
@include button-variant($value, $value);
|
|
|
|
}
|
2021-03-09 19:44:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@each $color, $value in $theme-colors-alt {
|
|
|
|
.btn-outline-#{$color} {
|
2021-05-15 20:19:39 +00:00
|
|
|
@if $color == dark {
|
|
|
|
@include button-outline-variant(darken($value, 20%));
|
|
|
|
} @else {
|
|
|
|
@include button-outline-variant($value);
|
|
|
|
}
|
2021-03-09 19:44:26 +00:00
|
|
|
}
|
|
|
|
}
|
2020-09-23 14:08:15 +00:00
|
|
|
}
|