ant-design/components/steps/style/index.less

189 lines
4.3 KiB
Plaintext
Raw Normal View History

@import "../../style/themes/default";
@import "../../style/mixins/index";
@steps-prefix-cls: ~"@{ant-prefix}-steps";
2018-06-20 20:51:24 +08:00
@process-icon-color: @primary-color;
@process-title-color: @heading-color;
@process-description-color: @text-color;
2016-03-04 17:06:39 +08:00
@process-tail-color: @border-color-split;
@process-icon-text-color: #fff;
@wait-icon-color: @disabled-color;
@wait-title-color: @text-color-secondary;
2015-07-08 15:53:51 +08:00
@wait-description-color: @wait-title-color;
2015-07-14 13:43:25 +08:00
@wait-tail-color: @process-tail-color;
2015-07-08 15:53:51 +08:00
@finish-icon-color: @process-icon-color;
@finish-title-color: @text-color;
2017-10-16 21:12:49 +08:00
@finish-description-color: @text-color-secondary;
@finish-tail-color: @primary-color;
2016-04-06 17:07:22 +08:00
@error-icon-color: @error-color;
@error-title-color: @error-color;
@error-description-color: @error-color;
@error-tail-color: @wait-tail-color;
@steps-background: @component-background;
2015-06-25 16:01:04 +08:00
@steps-icon-size: 32px;
@steps-small-icon-size: 24px;
2017-10-19 14:52:11 +08:00
@steps-dot-size: 8px;
@steps-current-dot-size: 10px;
@steps-desciption-max-width: 140px;
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls} {
.reset-component;
font-size: 0;
width: 100%;
display: flex;
}
2015-06-25 18:12:42 +08:00
.@{steps-prefix-cls}-item {
position: relative;
display: inline-block;
vertical-align: top;
flex: 1;
overflow: hidden;
2016-04-06 17:07:22 +08:00
&:last-child {
flex: none;
}
2016-04-06 17:07:22 +08:00
&:last-child &-tail,
&:last-child &-title:after {
display: none;
}
&-icon,
&-content {
display: inline-block;
vertical-align: top;
2015-06-24 14:52:49 +08:00
}
&-icon {
border: @border-width-base @border-style-base @wait-icon-color;
width: @steps-icon-size;
height: @steps-icon-size;
line-height: @steps-icon-size;
text-align: center;
border-radius: @steps-icon-size;
2016-11-08 21:07:01 +08:00
font-size: @font-size-lg;
2015-07-08 15:53:51 +08:00
margin-right: 8px;
transition: background-color .3s, border-color .3s;
font-family: @font-family;
2015-06-25 16:01:04 +08:00
2015-08-20 16:55:42 +08:00
> .@{steps-prefix-cls}-icon {
2015-06-25 18:12:42 +08:00
line-height: 1;
top: -1px;
2015-07-08 15:18:28 +08:00
color: @primary-color;
position: relative;
}
}
&-tail {
position: absolute;
left: 0;
width: 100%;
top: 12px;
2015-08-26 18:28:29 +08:00
padding: 0 10px;
2017-09-06 13:15:47 +08:00
&:after {
2018-11-12 12:02:30 +08:00
content: "";
2017-09-06 13:15:47 +08:00
display: inline-block;
background: @border-color-split;
height: 1px;
border-radius: 1px;
width: 100%;
transition: background .3s;
}
2015-06-25 16:01:04 +08:00
}
&-title {
font-size: @font-size-lg;
color: @text-color;
display: inline-block;
2017-10-16 21:12:49 +08:00
padding-right: 16px;
position: relative;
2017-09-07 11:00:36 +08:00
line-height: @steps-icon-size;
&:after {
2018-11-12 12:02:30 +08:00
content: "";
height: 1px;
width: 9999px;
background: @wait-tail-color;
display: block;
position: absolute;
2017-09-07 11:00:36 +08:00
top: @steps-icon-size / 2;
left: 100%;
2015-08-31 20:24:47 +08:00
}
2015-08-27 13:20:31 +08:00
}
&-description {
font-size: @font-size-base;
color: @text-color-secondary;
2015-08-26 18:28:29 +08:00
}
.step-item-status(wait);
.step-item-status(process);
&-process &-icon {
background: @process-icon-color;
> .@{steps-prefix-cls}-icon {
color: @process-icon-text-color;
2015-08-27 13:20:31 +08:00
}
}
&-process &-title {
font-weight: 500;
}
.step-item-status(finish);
.step-item-status(error);
2015-09-01 15:30:51 +08:00
&.@{steps-prefix-cls}-next-error .@{steps-prefix-cls}-item-title:after {
background: @error-icon-color;
}
}
.@{steps-prefix-cls}-horizontal:not(.@{steps-prefix-cls}-label-vertical) {
.@{steps-prefix-cls}-item {
2017-10-16 21:12:49 +08:00
margin-right: 16px;
2017-09-25 11:25:57 +08:00
white-space: nowrap;
&:last-child {
margin-right: 0;
}
2017-10-16 21:12:49 +08:00
&:last-child .@{steps-prefix-cls}-item-title {
padding-right: 0;
}
&-tail {
display: none;
}
&-description {
max-width: @steps-desciption-max-width;
white-space: normal;
}
}
}
.step-item-status(@status) {
@icon-color: "@{status}-icon-color";
@title-color: "@{status}-title-color";
@description-color: "@{status}-description-color";
@tail-color: "@{status}-tail-color";
&-@{status} &-icon {
border-color: @@icon-color;
background-color: @steps-background;
> .@{steps-prefix-cls}-icon {
color: @@icon-color;
.@{steps-prefix-cls}-icon-dot {
background: @@icon-color;
}
}
}
&-@{status} > &-content > &-title {
color: @@title-color;
&:after {
background-color: @@tail-color;
2017-02-28 15:13:23 +08:00
}
}
&-@{status} > &-content > &-description {
color: @@description-color;
}
&-@{status} > &-tail:after {
background-color: @@tail-color;
2017-08-16 16:07:57 +08:00
}
}
@import 'custom-icon';
@import 'small';
@import 'vertical';
@import 'label-placement';
@import 'progress-dot';