2017-07-28 20:13:52 +08:00
|
|
|
// Mixin for generating new styles
|
|
|
|
@mixin btn-styles($btn-color, $btn-states-color) {
|
|
|
|
background-color: $btn-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
2019-09-12 23:48:41 +08:00
|
|
|
&:not(:disabled):not(.disabled):active,
|
|
|
|
&:not(:disabled):not(.disabled).active,
|
|
|
|
&:not(:disabled):not(.disabled):active:focus,
|
|
|
|
&:not(:disabled):not(.disabled).active:focus,
|
2017-07-28 20:13:52 +08:00
|
|
|
&:active:hover,
|
|
|
|
&.active:hover,
|
2019-09-12 23:48:41 +08:00
|
|
|
.show > &.dropdown-toggle,
|
|
|
|
.show > &.dropdown-toggle:focus,
|
|
|
|
.show > &.dropdown-toggle:hover {
|
2017-07-28 20:13:52 +08:00
|
|
|
background-color: $btn-states-color;
|
|
|
|
color: $white-color;
|
2019-09-12 23:48:41 +08:00
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover{
|
|
|
|
box-shadow: 0 3px 8px 0 rgba(0,0,0, 0.17);
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.disabled,
|
|
|
|
&:disabled,
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&.focus,
|
|
|
|
&:active,
|
|
|
|
&.active {
|
|
|
|
background-color: $btn-color;
|
|
|
|
border-color: $btn-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// btn-neutral style
|
|
|
|
@if $btn-color == $white-color{
|
|
|
|
color: $primary-color;
|
|
|
|
|
2019-09-12 23:48:41 +08:00
|
|
|
|
2017-07-28 20:13:52 +08:00
|
|
|
&.btn-danger{
|
|
|
|
color: $danger-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active{
|
2019-09-12 23:48:41 +08:00
|
|
|
color: $danger-states-color !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-primary{
|
|
|
|
color: $primary-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active{
|
|
|
|
color: $primary-states-color !important;
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-info{
|
|
|
|
color: $info-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active{
|
2019-09-12 23:48:41 +08:00
|
|
|
color: $info-states-color !important;
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-warning{
|
|
|
|
color: $warning-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active{
|
2019-09-12 23:48:41 +08:00
|
|
|
color: $warning-states-color !important;
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-success{
|
|
|
|
color: $success-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active{
|
2019-09-12 23:48:41 +08:00
|
|
|
color: $success-states-color !important;
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-default{
|
|
|
|
color: $default-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active{
|
2019-09-12 23:48:41 +08:00
|
|
|
color: $default-states-color !important;
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-12 23:48:41 +08:00
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:not(:disabled):not(.disabled):active,
|
|
|
|
&:not(:disabled):not(.disabled).active,
|
|
|
|
&:not(:disabled):not(.disabled):active:focus,
|
|
|
|
&:not(:disabled):not(.disabled).active:focus,
|
2017-07-28 20:13:52 +08:00
|
|
|
&:active:hover,
|
|
|
|
&.active:hover,
|
2019-09-12 23:48:41 +08:00
|
|
|
.show > &.dropdown-toggle,
|
|
|
|
.show > &.dropdown-toggle:focus,
|
|
|
|
.show > &.dropdown-toggle:hover {
|
2017-07-28 20:13:52 +08:00
|
|
|
background-color: $white-color;
|
2019-09-12 23:48:41 +08:00
|
|
|
color: $primary-states-color;
|
|
|
|
box-shadow: none;
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover,
|
2019-09-12 23:48:41 +08:00
|
|
|
&:focus{
|
|
|
|
color: $primary-states-color !important;
|
|
|
|
|
|
|
|
&:not(.nav-link){
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
} @else {
|
|
|
|
color: $white-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-simple{
|
|
|
|
color: $btn-color;
|
|
|
|
border-color: $btn-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
2019-09-12 23:48:41 +08:00
|
|
|
&:not(:disabled):not(.disabled):active,
|
|
|
|
&:not(:disabled):not(.disabled).active,
|
|
|
|
&:not(:disabled):not(.disabled):active:focus,
|
|
|
|
&:not(:disabled):not(.disabled).active:focus,
|
|
|
|
&:active:hover,
|
|
|
|
&.active:hover,
|
|
|
|
.show > &.dropdown-toggle,
|
|
|
|
.show > &.dropdown-toggle:focus,
|
|
|
|
.show > &.dropdown-toggle:hover{
|
2017-07-28 20:13:52 +08:00
|
|
|
background-color: $transparent-bg;
|
|
|
|
color: $btn-states-color;
|
|
|
|
border-color: $btn-states-color;
|
2019-09-12 23:48:41 +08:00
|
|
|
box-shadow: none;
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-link{
|
|
|
|
color: $btn-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
2019-09-12 23:48:41 +08:00
|
|
|
&:not(:disabled):not(.disabled):active,
|
|
|
|
&:not(:disabled):not(.disabled).active,
|
|
|
|
&:not(:disabled):not(.disabled):active:focus,
|
|
|
|
&:not(:disabled):not(.disabled).active:focus,
|
|
|
|
&:active:hover,
|
|
|
|
&.active:hover,
|
|
|
|
.show > &.dropdown-toggle,
|
|
|
|
.show > &.dropdown-toggle:focus,
|
|
|
|
.show > &.dropdown-toggle:hover{
|
2017-07-28 20:13:52 +08:00
|
|
|
background-color: $transparent-bg;
|
|
|
|
color: $btn-states-color;
|
|
|
|
text-decoration: none;
|
2019-09-12 23:48:41 +08:00
|
|
|
box-shadow: none;
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-12 23:48:41 +08:00
|
|
|
@mixin outline-buttons($btn-color, $btn-states-color) {
|
|
|
|
color: $btn-color;
|
|
|
|
border-color: $btn-color;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:not(:disabled):not(.disabled):active,
|
|
|
|
&:not(:disabled):not(.disabled).active,
|
|
|
|
&:not(:disabled):not(.disabled):active:focus,
|
|
|
|
&:not(:disabled):not(.disabled).active:focus,
|
|
|
|
&:active:hover,
|
|
|
|
&.active:hover,
|
|
|
|
.show > &.dropdown-toggle,
|
|
|
|
.show > &.dropdown-toggle:focus,
|
|
|
|
.show > &.dropdown-toggle:hover {
|
|
|
|
background-color: $transparent-bg;
|
|
|
|
color: $btn-states-color;
|
|
|
|
border-color: $btn-states-color;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-28 20:13:52 +08:00
|
|
|
|
|
|
|
@mixin btn-size($padding-vertical, $padding-horizontal, $font-size, $border){
|
|
|
|
font-size: $font-size;
|
|
|
|
border-radius: $border;
|
|
|
|
padding: $padding-vertical $padding-horizontal;
|
|
|
|
|
2019-09-12 23:48:41 +08:00
|
|
|
&[class*="btn-outline-"] {
|
|
|
|
padding: $padding-vertical - 1 $padding-horizontal - 1;
|
2017-07-28 20:13:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|