2019-04-30 11:11:25 +08:00
|
|
|
.#{$ns}Button {
|
2019-12-06 09:58:08 +08:00
|
|
|
display: inline-block;
|
2020-12-21 10:08:40 +08:00
|
|
|
font-weight: var(--Button-fontWeight);
|
2019-12-06 09:58:08 +08:00
|
|
|
text-align: center;
|
|
|
|
vertical-align: middle;
|
|
|
|
user-select: none;
|
2020-12-21 10:08:40 +08:00
|
|
|
background: transparent;
|
|
|
|
border: var(--Button-borderWidth) solid transparent;
|
|
|
|
transition: var(--Button-transition);
|
2019-12-06 09:58:08 +08:00
|
|
|
white-space: nowrap;
|
2020-12-21 10:08:40 +08:00
|
|
|
min-width: var(--Button-mimWidth);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2020-11-30 21:33:12 +08:00
|
|
|
&:active,
|
|
|
|
&.is-active {
|
2021-07-09 11:32:41 +08:00
|
|
|
color: var(--Button-onActive-color);
|
2020-12-21 10:08:40 +08:00
|
|
|
box-shadow: var(--Button-onActive-boxShadow);
|
2021-07-09 11:32:41 +08:00
|
|
|
border-color: var(--Button-onActive-border);
|
2020-11-30 21:33:12 +08:00
|
|
|
|
|
|
|
&:focus {
|
2020-12-21 10:08:40 +08:00
|
|
|
box-shadow: var(--Button-onActive-boxShadow);
|
2020-11-30 21:33:12 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-size(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button-paddingY),
|
|
|
|
var(--Button-paddingX),
|
|
|
|
var(--Button-fontSize),
|
|
|
|
var(--Button-lineHeight),
|
|
|
|
var(--Button-borderRadius),
|
|
|
|
var(--Button-height)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
@include hover-focus {
|
2020-12-21 10:08:40 +08:00
|
|
|
// color: var(--text-color);
|
2019-12-06 09:58:08 +08:00
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus,
|
|
|
|
&.focus {
|
|
|
|
outline: 0;
|
2020-12-21 10:08:40 +08:00
|
|
|
box-shadow: var(--Button-onFocus-boxShadow);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.is-disabled,
|
|
|
|
&:disabled {
|
2021-10-29 17:38:57 +08:00
|
|
|
// opacity: var(--Button-onDisabled-opacity);
|
2021-05-26 23:22:17 +08:00
|
|
|
filter: grayscale(100%);
|
2019-12-06 09:58:08 +08:00
|
|
|
box-shadow: none;
|
2021-05-19 22:01:43 +08:00
|
|
|
cursor: not-allowed;
|
2021-10-29 17:38:57 +08:00
|
|
|
color: var(--text--muted-color);
|
|
|
|
pointer-events: auto;
|
2021-11-06 11:54:49 +08:00
|
|
|
border: var(--Button-borderWidth) solid var(--Button-onDisabled-borderColor);
|
2021-11-02 15:50:29 +08:00
|
|
|
background: var(--Button-onDisabled-bg);
|
2021-11-24 21:51:13 +08:00
|
|
|
|
|
|
|
& > svg,
|
|
|
|
& > svg path {
|
|
|
|
fill: currentColor;
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&:not(:disabled):not(.is-disabled) {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2021-10-29 17:38:57 +08:00
|
|
|
&.cxd-Button--link.is-disabled {
|
|
|
|
background: transparent;
|
2021-11-06 11:54:49 +08:00
|
|
|
border: none;
|
2021-10-29 17:38:57 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
> .pull-left,
|
|
|
|
> .pull-right {
|
|
|
|
line-height: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .fa,
|
|
|
|
> .iconfont,
|
|
|
|
> .glyphicon {
|
|
|
|
font-size: inherit;
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
a.#{$ns}Button.is-disabled,
|
|
|
|
fieldset:disabled a.#{$ns}Button {
|
2019-12-06 09:58:08 +08:00
|
|
|
pointer-events: none;
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--primary {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-variant(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--primary-bg),
|
|
|
|
var(--Button--primary-border),
|
|
|
|
var(--Button--primary-color),
|
|
|
|
var(--Button--primary-onHover-bg),
|
|
|
|
var(--Button--primary-onHover-border),
|
|
|
|
var(--Button--primary-onHover-color),
|
|
|
|
var(--Button--primary-onActive-bg),
|
|
|
|
var(--Button--primary-onActive-border),
|
|
|
|
var(--Button--primary-onActive-color)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--secondary {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-variant(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--secondary-bg),
|
|
|
|
var(--Button--secondary-border),
|
|
|
|
var(--Button--secondary-color),
|
|
|
|
var(--Button--secondary-onHover-bg),
|
|
|
|
var(--Button--secondary-onHover-border),
|
|
|
|
var(--Button--secondary-onHover-color),
|
|
|
|
var(--Button--secondary-onActive-bg),
|
|
|
|
var(--Button--secondary-onActive-border),
|
|
|
|
var(--Button--secondary-onActive-color)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--success {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-variant(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--success-bg),
|
|
|
|
var(--Button--success-border),
|
|
|
|
var(--Button--success-color),
|
|
|
|
var(--Button--success-onHover-bg),
|
|
|
|
var(--Button--success-onHover-border),
|
|
|
|
var(--Button--success-onHover-color),
|
|
|
|
var(--Button--success-onActive-bg),
|
|
|
|
var(--Button--success-onActive-border),
|
|
|
|
var(--Button--success-onActive-color)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2021-10-29 17:38:57 +08:00
|
|
|
.#{$ns}Button--enhance {
|
|
|
|
@include button-variant(
|
|
|
|
var(--Button--enhance-bg),
|
|
|
|
var(--Button--enhance-border),
|
|
|
|
var(--Button--enhance-color),
|
|
|
|
var(--Button--enhance-onHover-bg),
|
|
|
|
var(--Button--enhance-onHover-border),
|
|
|
|
var(--Button--enhance-onHover-color),
|
|
|
|
var(--Button--enhance-onActive-bg),
|
|
|
|
var(--Button--enhance-onActive-border),
|
|
|
|
var(--Button--enhance-onActive-color)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
.#{$ns}Button--info {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-variant(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--info-bg),
|
|
|
|
var(--Button--info-border),
|
|
|
|
var(--Button--info-color),
|
|
|
|
var(--Button--info-onHover-bg),
|
|
|
|
var(--Button--info-onHover-border),
|
|
|
|
var(--Button--info-onHover-color),
|
|
|
|
var(--Button--info-onActive-bg),
|
|
|
|
var(--Button--info-onActive-border),
|
|
|
|
var(--Button--info-onActive-color)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--warning {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-variant(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--warning-bg),
|
|
|
|
var(--Button--warning-border),
|
|
|
|
var(--Button--warning-color),
|
|
|
|
var(--Button--warning-onHover-bg),
|
|
|
|
var(--Button--warning-onHover-border),
|
|
|
|
var(--Button--warning-onHover-color),
|
|
|
|
var(--Button--warning-onActive-bg),
|
|
|
|
var(--Button--warning-onActive-border),
|
|
|
|
var(--Button--warning-onActive-color)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--danger {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-variant(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--danger-bg),
|
|
|
|
var(--Button--danger-border),
|
|
|
|
var(--Button--danger-color),
|
|
|
|
var(--Button--danger-onHover-bg),
|
|
|
|
var(--Button--danger-onHover-border),
|
|
|
|
var(--Button--danger-onHover-color),
|
|
|
|
var(--Button--danger-onActive-bg),
|
|
|
|
var(--Button--danger-onActive-border),
|
|
|
|
var(--Button--danger-onActive-color)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--light {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-variant(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--light-bg),
|
|
|
|
var(--Button--light-border),
|
|
|
|
var(--Button--light-color),
|
|
|
|
var(--Button--light-onHover-bg),
|
|
|
|
var(--Button--light-onHover-border),
|
|
|
|
var(--Button--light-onHover-color),
|
|
|
|
var(--Button--light-onActive-bg),
|
|
|
|
var(--Button--light-onActive-border),
|
|
|
|
var(--Button--light-onActive-color)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--dark {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-variant(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--dark-bg),
|
|
|
|
var(--Button--dark-border),
|
|
|
|
var(--Button--dark-color),
|
|
|
|
var(--Button--dark-onHover-bg),
|
|
|
|
var(--Button--dark-onHover-border),
|
|
|
|
var(--Button--dark-onHover-color),
|
|
|
|
var(--Button--dark-onActive-bg),
|
|
|
|
var(--Button--dark-onActive-border),
|
|
|
|
var(--Button--dark-onActive-color)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--default {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-variant(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--default-bg),
|
|
|
|
var(--Button--default-border),
|
|
|
|
var(--Button--default-color),
|
|
|
|
var(--Button--default-onHover-bg),
|
|
|
|
var(--Button--default-onHover-border),
|
|
|
|
var(--Button--default-onHover-color),
|
|
|
|
var(--Button--default-onActive-bg),
|
|
|
|
var(--Button--default-onActive-border),
|
|
|
|
var(--Button--default-onActive-color)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--xs {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-size(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--xs-paddingY),
|
|
|
|
var(--Button--xs-paddingX),
|
|
|
|
var(--Button--xs-fontSize),
|
|
|
|
var(--Button--xs-lineHeight),
|
|
|
|
var(--Button--sm-borderRadius),
|
|
|
|
var(--Button--xs-height)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
&.#{$ns}Button--iconOnly {
|
2020-12-21 10:08:40 +08:00
|
|
|
min-width: calc(
|
|
|
|
var(--Button--xs-height) * var(--Button--iconOnly-minWidthRate)
|
|
|
|
);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--sm {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-size(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--sm-paddingY),
|
|
|
|
var(--Button--sm-paddingX),
|
|
|
|
var(--Button--sm-fontSize),
|
|
|
|
var(--Button--sm-lineHeight),
|
|
|
|
var(--Button--sm-borderRadius),
|
|
|
|
var(--Button--sm-height)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
&.#{$ns}Button--iconOnly {
|
2020-12-21 10:08:40 +08:00
|
|
|
min-width: calc(
|
|
|
|
var(--Button--sm-height) * var(--Button--iconOnly-minWidthRate)
|
|
|
|
);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--md {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-size(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--md-paddingY),
|
|
|
|
var(--Button--md-paddingX),
|
|
|
|
var(--Button--md-fontSize),
|
|
|
|
var(--Button--md-lineHeight),
|
|
|
|
var(--Button-borderRadius),
|
|
|
|
var(--Button--md-height)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
&.#{$ns}Button--iconOnly {
|
2020-12-21 10:08:40 +08:00
|
|
|
min-width: calc(
|
|
|
|
var(--Button--md-height) * var(--Button--iconOnly-minWidthRate)
|
|
|
|
);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--lg {
|
2019-12-06 09:58:08 +08:00
|
|
|
@include button-size(
|
2020-12-21 10:08:40 +08:00
|
|
|
var(--Button--lg-paddingY),
|
|
|
|
var(--Button--lg-paddingX),
|
|
|
|
var(--Button--lg-fontSize),
|
|
|
|
var(--Button--lg-lineHeight),
|
|
|
|
var(--Button--lg-borderRadius),
|
|
|
|
var(--Button--lg-height)
|
2019-12-06 09:58:08 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
&.#{$ns}Button--iconOnly {
|
2020-12-21 10:08:40 +08:00
|
|
|
min-width: calc(
|
|
|
|
var(--Button--lg-height) * var(--Button--iconOnly-minWidthRate)
|
|
|
|
);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--iconOnly {
|
2020-12-21 10:08:40 +08:00
|
|
|
min-width: calc(var(--Button-height) * var(--Button--iconOnly-minWidthRate));
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&:not(.#{$ns}Button--link) {
|
2020-06-08 15:49:45 +08:00
|
|
|
> svg.icon {
|
2020-06-07 23:40:07 +08:00
|
|
|
width: px2rem(14px);
|
|
|
|
height: px2rem(14px);
|
|
|
|
top: px2rem(2px);
|
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
> .fa,
|
|
|
|
> .iconfont {
|
2020-12-21 10:08:40 +08:00
|
|
|
font-size: var(--fontSizeMd);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
> .iconfont {
|
|
|
|
line-height: 1;
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2021-10-29 17:38:57 +08:00
|
|
|
.#{$ns}Button--loading {
|
|
|
|
@include button-loading-icon();
|
|
|
|
}
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
.#{$ns}Button--link {
|
2019-12-06 09:58:08 +08:00
|
|
|
width: auto;
|
|
|
|
min-width: auto;
|
2020-12-21 10:08:40 +08:00
|
|
|
font-weight: var(--fontWeightNormal);
|
|
|
|
color: var(--Button--link-color);
|
|
|
|
text-decoration: var(--link-decoration);
|
2019-12-06 09:58:08 +08:00
|
|
|
border: none;
|
2020-02-24 15:06:05 +08:00
|
|
|
height: auto;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
@include hover-focus {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--Button--link-onHover-color);
|
2021-10-29 17:38:57 +08:00
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include hover-active {
|
|
|
|
color: var(--Button--link-onActive-color);
|
2019-12-06 09:58:08 +08:00
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled,
|
|
|
|
&.is-disabled {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--text--muted-color);
|
2019-12-06 09:58:08 +08:00
|
|
|
pointer-events: none;
|
2021-11-02 15:50:29 +08:00
|
|
|
background: var(--Button-onDisabled-bg);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Button--block {
|
2019-12-06 09:58:08 +08:00
|
|
|
display: block;
|
|
|
|
width: 100%;
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
+ .#{$ns}Button--block {
|
2020-12-21 10:08:40 +08:00
|
|
|
margin-top: var(--gap-base);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
input[type='submit'],
|
|
|
|
input[type='reset'],
|
|
|
|
input[type='button'] {
|
|
|
|
&.#{$ns}Button--block {
|
|
|
|
width: 100%;
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}ButtonToolbar {
|
2021-04-08 23:19:23 +08:00
|
|
|
margin-left: calc(var(--gap-xs) * -1);
|
|
|
|
margin-top: calc(var(--gap-xs) * -1);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
> .#{$ns}Button {
|
2021-04-08 23:19:23 +08:00
|
|
|
margin-left: var(--gap-xs);
|
|
|
|
margin-top: var(--gap-xs);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
}
|
2021-11-29 22:20:29 +08:00
|
|
|
|
|
|
|
.#{$ns}Action {
|
2021-11-30 13:41:42 +08:00
|
|
|
display: inline-block;
|
2021-11-29 22:20:29 +08:00
|
|
|
&:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|