2016-04-27 20:44:36 +08:00
|
|
|
@import "../../style/themes/default";
|
|
|
|
@import "../../style/mixins/index";
|
|
|
|
@import "./mixin";
|
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
@btn-prefix-cls: ~"@{ant-prefix}-btn";
|
2015-06-09 15:21:44 +08:00
|
|
|
|
2018-07-06 14:08:37 +08:00
|
|
|
// for compatible
|
2017-08-04 17:58:32 +08:00
|
|
|
@btn-ghost-color: @text-color;
|
|
|
|
@btn-ghost-bg: transparent;
|
|
|
|
@btn-ghost-border: @border-color-base;
|
2017-01-23 22:24:36 +08:00
|
|
|
|
2015-06-09 15:21:44 +08:00
|
|
|
// Button styles
|
|
|
|
// -----------------------------
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{btn-prefix-cls} {
|
2018-01-05 21:34:58 +08:00
|
|
|
line-height: @line-height-base;
|
2015-06-09 15:21:44 +08:00
|
|
|
.btn;
|
2015-06-11 17:16:32 +08:00
|
|
|
.btn-default;
|
2015-06-09 15:21:44 +08:00
|
|
|
|
2017-08-16 17:43:56 +08:00
|
|
|
// Make sure that the target of Button's click event always be `button`
|
|
|
|
// Ref: https://github.com/ant-design/ant-design/issues/7034
|
|
|
|
> i,
|
|
|
|
> span {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
2015-06-09 15:21:44 +08:00
|
|
|
&-primary {
|
|
|
|
.btn-primary;
|
2015-06-12 19:41:30 +08:00
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{btn-prefix-cls}-group &:not(:first-child):not(:last-child) {
|
2015-07-09 10:56:28 +08:00
|
|
|
border-right-color: @btn-group-border;
|
|
|
|
border-left-color: @btn-group-border;
|
2016-12-30 14:27:23 +08:00
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
border-color: @btn-default-border;
|
|
|
|
}
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{btn-prefix-cls}-group &:first-child {
|
2015-06-09 15:21:44 +08:00
|
|
|
&:not(:last-child) {
|
2015-07-09 10:56:28 +08:00
|
|
|
border-right-color: @btn-group-border;
|
2016-01-25 21:06:32 +08:00
|
|
|
&[disabled] {
|
|
|
|
border-right-color: @btn-default-border;
|
|
|
|
}
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-25 21:06:32 +08:00
|
|
|
.@{btn-prefix-cls}-group &:last-child:not(:first-child),
|
2016-12-30 14:27:23 +08:00
|
|
|
.@{btn-prefix-cls}-group & + & {
|
2015-07-09 10:56:28 +08:00
|
|
|
border-left-color: @btn-group-border;
|
2016-01-25 21:06:32 +08:00
|
|
|
&[disabled] {
|
|
|
|
border-left-color: @btn-default-border;
|
|
|
|
}
|
2015-07-08 16:21:04 +08:00
|
|
|
}
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-ghost {
|
|
|
|
.btn-ghost;
|
|
|
|
}
|
|
|
|
|
2015-11-30 18:26:44 +08:00
|
|
|
&-dashed {
|
|
|
|
.btn-dashed;
|
|
|
|
}
|
|
|
|
|
2017-01-23 22:24:36 +08:00
|
|
|
&-danger {
|
|
|
|
.btn-danger;
|
|
|
|
}
|
|
|
|
|
2015-11-26 19:32:55 +08:00
|
|
|
&-circle,
|
|
|
|
&-circle-outline {
|
2015-08-20 16:55:42 +08:00
|
|
|
.btn-circle(@btn-prefix-cls);
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
|
|
|
|
2016-04-15 16:21:08 +08:00
|
|
|
&:before {
|
|
|
|
position: absolute;
|
|
|
|
top: -1px;
|
|
|
|
left: -1px;
|
|
|
|
bottom: -1px;
|
|
|
|
right: -1px;
|
|
|
|
background: #fff;
|
|
|
|
opacity: 0.35;
|
|
|
|
content: '';
|
|
|
|
border-radius: inherit;
|
|
|
|
z-index: 1;
|
|
|
|
transition: opacity .2s;
|
|
|
|
pointer-events: none;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2017-04-15 14:57:05 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
transition: margin-left .3s @ease-in-out;
|
|
|
|
}
|
|
|
|
|
2017-02-15 11:55:08 +08:00
|
|
|
&&-loading:before {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2017-09-23 16:08:30 +08:00
|
|
|
&&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
|
2015-12-28 13:49:58 +08:00
|
|
|
padding-left: 29px;
|
2015-07-30 11:15:03 +08:00
|
|
|
pointer-events: none;
|
2016-04-15 16:21:08 +08:00
|
|
|
position: relative;
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
2016-04-12 12:17:03 +08:00
|
|
|
margin-left: -14px;
|
2015-12-28 13:49:58 +08:00
|
|
|
}
|
2015-07-29 22:23:55 +08:00
|
|
|
}
|
|
|
|
|
2017-09-23 16:08:30 +08:00
|
|
|
&-sm&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
|
2015-12-28 13:49:58 +08:00
|
|
|
padding-left: 24px;
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
2016-04-12 12:17:03 +08:00
|
|
|
margin-left: -17px;
|
2015-07-29 22:23:55 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-09 15:21:44 +08:00
|
|
|
&-group {
|
2015-08-20 16:55:42 +08:00
|
|
|
.btn-group(@btn-prefix-cls);
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
2015-09-27 16:30:35 +08:00
|
|
|
|
2016-04-27 20:44:36 +08:00
|
|
|
&:not(&-circle):not(&-circle-outline)&-icon-only {
|
2017-11-27 14:41:17 +08:00
|
|
|
padding-left: 8px;
|
|
|
|
padding-right: 8px;
|
2016-04-06 15:43:50 +08:00
|
|
|
}
|
|
|
|
|
2017-03-05 20:12:36 +08:00
|
|
|
// http://stackoverflow.com/a/21281554/3040605
|
|
|
|
&:focus > span,
|
|
|
|
&:active > span {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2015-09-27 16:30:35 +08:00
|
|
|
// To ensure that a space will be placed between character and `Icon`.
|
2015-11-26 19:32:55 +08:00
|
|
|
> .@{iconfont-css-prefix} + span,
|
|
|
|
> span + .@{iconfont-css-prefix} {
|
2017-10-17 11:40:37 +08:00
|
|
|
margin-left: 8px;
|
2015-09-27 16:30:35 +08:00
|
|
|
}
|
2016-02-18 16:08:48 +08:00
|
|
|
|
2017-01-23 22:24:36 +08:00
|
|
|
&-background-ghost {
|
2017-08-04 17:58:32 +08:00
|
|
|
background: transparent !important;
|
2017-01-23 22:24:36 +08:00
|
|
|
border-color: #fff;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
|
2017-01-31 21:27:23 +08:00
|
|
|
&-background-ghost&-primary {
|
2018-02-02 17:23:14 +08:00
|
|
|
.button-variant-ghost(@btn-primary-bg);
|
2017-03-18 16:33:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-background-ghost&-danger {
|
2017-04-22 10:44:17 +08:00
|
|
|
.button-variant-ghost(@btn-danger-color);
|
2017-01-23 22:24:36 +08:00
|
|
|
}
|
2018-01-02 16:27:59 +08:00
|
|
|
|
|
|
|
&-two-chinese-chars:first-letter {
|
|
|
|
letter-spacing: .34em;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-two-chinese-chars > * {
|
|
|
|
letter-spacing: .34em;
|
|
|
|
margin-right: -.34em;
|
|
|
|
}
|
2018-07-29 06:54:54 +08:00
|
|
|
|
2018-07-29 16:33:26 +08:00
|
|
|
&-block {
|
2018-07-29 06:54:54 +08:00
|
|
|
width: 100%;
|
|
|
|
}
|
2018-09-10 11:22:26 +08:00
|
|
|
|
|
|
|
.christmas&-primary:before {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
top: -6px;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
background: url(data:image/png;base64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7/AeiegbWOEVhmsVcWDwPn224iDJgla8Hd38Hd3ELQgaIeI/hZgAIPEp0vmQJdoAAAAAElFTkSuQmCC) no-repeat 50% 0;
|
|
|
|
background-size: 64px;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.christmas&-primary&-lg:before {
|
|
|
|
background-size: 72px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.christmas&-primary&-sm:before {
|
|
|
|
background-size: 56px;
|
|
|
|
}
|
2016-02-18 16:08:48 +08:00
|
|
|
}
|
|
|
|
|
2017-11-29 11:20:22 +08:00
|
|
|
a.@{btn-prefix-cls} {
|
|
|
|
line-height: @btn-height-base - 2px;
|
|
|
|
&-lg {
|
|
|
|
line-height: @btn-height-lg - 2px;
|
|
|
|
}
|
|
|
|
&-sm {
|
|
|
|
line-height: @btn-height-sm - 2px;
|
|
|
|
}
|
|
|
|
}
|