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

470 lines
11 KiB
Plaintext
Raw Normal View History

@import "../../style/themes/default";
@import "../../style/mixins/index";
@steps-prefix-cls: ~"@{ant-prefix}-steps";
2015-07-08 16:36:08 +08:00
@process-icon-color: @primary-color;
2016-11-08 20:50:59 +08:00
@process-title-color: @text-color;
2015-07-08 15:53:51 +08:00
@process-description-color: @process-title-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: @wait-title-color;
@finish-description-color: @finish-title-color;
@finish-tail-color: @process-icon-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: @error-color;
@steps-background: @component-background;
2015-06-25 16:01:04 +08:00
@steps-icon-size: 26px;
@steps-small-icon-size: 18px;
@steps-dot-size: 5px;
@steps-current-dot-size: 7px;
2017-02-28 15:13:23 +08:00
@steps-desciption-max-width: 120px;
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls} {
font-size: 0;
2015-06-25 16:01:04 +08:00
width: 100%;
line-height: 1.5;
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-item {
2015-06-24 14:52:49 +08:00
position: relative;
display: inline-block;
2015-07-08 16:36:08 +08:00
vertical-align: top;
2015-08-20 16:55:42 +08:00
&.@{steps-prefix-cls}-status-wait {
.@{steps-prefix-cls}-head-inner {
2015-07-08 15:53:51 +08:00
border-color: @wait-icon-color;
background-color: @steps-background;
2015-08-20 16:55:42 +08:00
> .@{steps-prefix-cls}-icon {
2015-07-08 15:53:51 +08:00
color: @wait-icon-color;
.@{steps-prefix-cls}-icon-dot {
background: @wait-icon-color;
}
2015-06-25 16:01:04 +08:00
}
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-title {
2015-07-08 15:53:51 +08:00
color: @wait-title-color;
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-description {
2015-07-08 15:53:51 +08:00
color: @wait-description-color;
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-tail > i {
2015-07-08 15:53:51 +08:00
background-color: @wait-tail-color;
}
}
2015-08-20 16:55:42 +08:00
&.@{steps-prefix-cls}-status-process {
.@{steps-prefix-cls}-head-inner {
2015-07-08 15:53:51 +08:00
border-color: @process-icon-color;
background-color: @process-icon-color;
2015-08-20 16:55:42 +08:00
> .@{steps-prefix-cls}-icon {
color: @process-icon-text-color;
.@{steps-prefix-cls}-icon-dot {
background: @process-icon-color;
}
2015-06-25 16:01:04 +08:00
}
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-title {
2015-07-08 15:53:51 +08:00
color: @process-title-color;
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-description {
2015-07-08 15:53:51 +08:00
color: @process-description-color;
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-tail > i {
2015-07-08 15:53:51 +08:00
background-color: @process-tail-color;
}
}
2015-08-20 16:55:42 +08:00
&.@{steps-prefix-cls}-status-finish {
.@{steps-prefix-cls}-head-inner {
2015-07-08 15:53:51 +08:00
border-color: @finish-icon-color;
background-color: @steps-background;
2015-08-20 16:55:42 +08:00
> .@{steps-prefix-cls}-icon {
2015-07-08 15:53:51 +08:00
color: @finish-icon-color;
.@{steps-prefix-cls}-icon-dot {
background: @finish-icon-color;
}
}
}
2015-11-08 15:42:33 +08:00
.@{steps-prefix-cls}-tail > i:after {
width: 100%;
background: @finish-tail-color;
2017-03-18 15:32:29 +08:00
transition: all .6s;
2015-11-08 15:42:33 +08:00
opacity: 1;
2017-03-18 15:32:29 +08:00
box-shadow: 0 0 0 0 @primary-color;
animation: tailEffect .4s;
2015-07-08 15:53:51 +08:00
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-title {
2015-07-08 15:53:51 +08:00
color: @finish-title-color;
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-description {
2015-07-08 15:53:51 +08:00
color: @finish-description-color;
}
2015-06-25 18:12:42 +08:00
}
2016-04-06 17:07:22 +08:00
&.@{steps-prefix-cls}-status-error {
.@{steps-prefix-cls}-head-inner {
border-color: @error-icon-color;
background-color: @steps-background;
2016-04-06 17:07:22 +08:00
> .@{steps-prefix-cls}-icon {
2016-04-06 17:50:04 +08:00
color: @error-icon-color;
.@{steps-prefix-cls}-icon-dot {
background: @error-icon-color;
}
2016-04-06 17:07:22 +08:00
}
}
.@{steps-prefix-cls}-title {
color: @error-title-color;
}
.@{steps-prefix-cls}-description {
color: @error-description-color;
}
.@{steps-prefix-cls}-tail > i {
background-color: @process-tail-color;
}
}
&.@{steps-prefix-cls}-next-error {
.@{steps-prefix-cls}-tail > i,
.@{steps-prefix-cls}-tail > i:after {
background-color: @error-tail-color;
}
}
2015-08-20 16:55:42 +08:00
&.@{steps-prefix-cls}-custom {
.@{steps-prefix-cls}-head-inner {
2015-06-25 18:12:42 +08:00
background: none;
border: 0;
2015-07-08 15:53:51 +08:00
width: auto;
height: auto;
2015-08-20 16:55:42 +08:00
> .@{steps-prefix-cls}-icon {
font-size: @steps-icon-size;
width: @steps-icon-size;
height: @steps-icon-size;
2015-07-08 16:36:08 +08:00
}
2015-06-25 18:12:42 +08:00
}
2015-08-20 16:55:42 +08:00
&.@{steps-prefix-cls}-status-process {
.@{steps-prefix-cls}-head-inner > .@{steps-prefix-cls}-icon {
2015-07-08 15:53:51 +08:00
color: @process-icon-color;
2015-06-25 18:12:42 +08:00
}
}
}
}
2015-11-26 19:32:55 +08:00
.@{steps-prefix-cls}-head,
.@{steps-prefix-cls}-main {
position: relative;
display: inline-block;
vertical-align: top;
2015-06-24 14:52:49 +08:00
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-head {
background: @steps-background;
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-head-inner {
display: block;
border: @border-width-base @border-style-base @wait-icon-color;
width: @steps-icon-size;
height: @steps-icon-size;
2016-11-08 14:10:43 +08:00
line-height: 23px;
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;
2015-10-09 21:11:27 +08:00
transition: background-color 0.3s ease, border-color 0.3s ease;
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;
2015-07-08 15:18:28 +08:00
color: @primary-color;
position: relative;
&.@{iconfont-css-prefix} {
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
2016-04-06 17:50:04 +08:00
&-cross,
&-check {
font-weight: bold;
}
2015-07-09 18:17:15 +08:00
}
}
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-main {
margin-top: 2.5px;
2015-06-24 14:52:49 +08:00
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-title {
2016-11-08 21:07:01 +08:00
font-size: @font-size-lg;
margin-bottom: 4px;
2016-11-08 20:50:59 +08:00
color: @text-color;
font-weight: bold;
background-color: @steps-background;
display: inline-block;
padding-right: 10px;
2016-01-28 19:15:22 +08:00
> a:first-child:last-child {
2016-11-08 20:50:59 +08:00
color: @text-color;
2016-01-28 19:15:22 +08:00
}
}
2017-04-05 11:55:16 +08:00
.@{steps-prefix-cls}-item:last-child {
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-title {
padding-right: 0;
2016-07-05 17:49:48 +08:00
width: 100%;
}
2017-04-05 11:55:16 +08:00
.@{steps-prefix-cls}-tail {
display: none;
}
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-description {
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
color: @text-color-secondary;
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-tail {
position: absolute;
left: 0;
width: 100%;
2015-07-21 09:46:35 +08:00
top: 13px;
2015-08-26 18:28:29 +08:00
padding: 0 10px;
> i {
display: inline-block;
2015-07-21 09:46:35 +08:00
vertical-align: top;
2015-07-08 15:53:51 +08:00
background: @wait-tail-color;
2015-07-14 13:43:25 +08:00
height: 1px;
border-radius: 1px;
width: 100%;
2015-11-08 15:42:33 +08:00
position: relative;
&:after {
position: absolute;
content: '';
top: 0;
width: 0;
2016-03-04 17:06:39 +08:00
background: @border-color-split;
2015-11-08 15:42:33 +08:00
height: 100%;
opacity: 0;
}
}
}
2015-08-20 16:55:42 +08:00
&.@{steps-prefix-cls}-small {
.@{steps-prefix-cls}-head-inner {
border: @border-width-base @border-style-base @wait-icon-color;
width: @steps-small-icon-size;
height: @steps-small-icon-size;
2016-11-08 14:10:43 +08:00
line-height: 15px;
2015-06-25 16:01:04 +08:00
text-align: center;
border-radius: @steps-small-icon-size;
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
2015-06-25 16:01:04 +08:00
margin-right: 10px;
> .@{steps-prefix-cls}-icon.@{iconfont-css-prefix} {
.iconfont-size-under-12px(9px);
top: 0;
2015-07-09 18:17:15 +08:00
}
2015-06-25 16:01:04 +08:00
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-main {
2015-06-25 16:01:04 +08:00
margin-top: 0;
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-title {
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
2015-06-25 16:01:04 +08:00
margin-bottom: 4px;
2016-11-08 20:50:59 +08:00
color: @text-color;
2015-06-25 16:01:04 +08:00
font-weight: bold;
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-description {
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
color: @text-color-secondary;
2015-06-25 16:01:04 +08:00
}
2015-08-20 16:55:42 +08:00
.@{steps-prefix-cls}-tail {
2015-06-25 18:12:42 +08:00
top: 8px;
2015-08-26 18:28:29 +08:00
padding: 0 8px;
2015-06-25 16:01:04 +08:00
> i {
height: 1px;
border-radius: 1px;
width: 100%;
}
}
.@{steps-prefix-cls}-custom .@{steps-prefix-cls}-head-inner > .@{steps-prefix-cls}-icon {
font-size: @steps-small-icon-size;
width: @steps-small-icon-size;
height: @steps-small-icon-size;
}
2015-06-25 16:01:04 +08:00
}
2015-07-08 15:18:28 +08:00
}
2015-08-26 18:28:29 +08:00
2015-08-31 20:24:47 +08:00
.@{steps-prefix-cls}-vertical {
.@{steps-prefix-cls}-item {
2015-08-26 18:28:29 +08:00
display: block;
}
2015-09-01 17:43:42 +08:00
2015-08-31 20:24:47 +08:00
.@{steps-prefix-cls}-tail {
position: absolute;
2015-08-26 18:28:29 +08:00
left: 13px;
2015-08-31 20:24:47 +08:00
top: 0;
2015-08-26 18:28:29 +08:00
height: 100%;
width: 1px;
padding: 30px 0 4px;
2015-08-26 18:28:29 +08:00
> i {
height: 100%;
width: 1px;
2015-11-08 15:42:33 +08:00
&:after {
height: 0;
width: 100%;
}
}
}
.@{steps-prefix-cls}-status-finish {
.@{steps-prefix-cls}-tail > i:after {
height: 100%;
2015-08-26 18:28:29 +08:00
}
}
2015-09-01 17:43:42 +08:00
2015-08-31 20:24:47 +08:00
.@{steps-prefix-cls}-head {
float: left;
&-inner {
margin-right: 16px;
}
2015-08-27 13:20:31 +08:00
}
2015-09-01 17:43:42 +08:00
2015-08-31 20:24:47 +08:00
.@{steps-prefix-cls}-main {
min-height: 47px;
overflow: hidden;
display: block;
.@{steps-prefix-cls}-title {
line-height: @steps-icon-size;
2015-08-31 20:24:47 +08:00
}
.@{steps-prefix-cls}-description {
padding-bottom: 12px;
}
2015-08-26 18:28:29 +08:00
}
2015-08-31 20:24:47 +08:00
}
2015-08-27 13:20:31 +08:00
2015-08-31 20:24:47 +08:00
.@{steps-prefix-cls}-vertical.@{steps-prefix-cls}-small {
.@{steps-prefix-cls}-tail {
position: absolute;
2015-09-01 15:30:51 +08:00
left: 9px;
2015-08-31 20:24:47 +08:00
top: 0;
padding: 22px 0 4px;
2015-08-27 13:20:31 +08:00
> i {
height: 100%;
}
}
2015-09-01 15:30:51 +08:00
.@{steps-prefix-cls}-title {
line-height: @steps-small-icon-size;
2015-08-27 13:20:31 +08:00
}
2015-09-01 15:30:51 +08:00
}
.@{steps-prefix-cls}-horizontal {
&.@{steps-prefix-cls}-hidden {
2016-05-17 15:10:54 +08:00
visibility: hidden;
}
.@{steps-prefix-cls}-description {
2017-02-28 15:13:23 +08:00
max-width: @steps-desciption-max-width;
}
.@{steps-prefix-cls}-item:not(:first-child) .@{steps-prefix-cls}-head {
padding-left: 10px;
margin-left: -10px;
}
}
2017-02-28 15:13:23 +08:00
.@{steps-prefix-cls}-dot {
.@{steps-prefix-cls}-item {
.@{steps-prefix-cls}-step {
display: inline-block;
text-align: center;
2017-02-28 15:13:23 +08:00
width: @steps-desciption-max-width;
}
2017-02-28 15:13:23 +08:00
&:not(:first-child) .@{steps-prefix-cls}-head {
margin-left: 0;
padding-left: 0;
}
}
.@{steps-prefix-cls}-tail {
2017-02-28 15:13:23 +08:00
margin: 0 0 0 @steps-desciption-max-width / 2;
padding: 0;
width: 100%;
top: 1px;
& > i {
height: 3px;
}
}
.@{steps-prefix-cls}-head {
2017-02-28 15:13:23 +08:00
display: inline-block;
padding-right: 0;
&-inner {
2017-02-28 15:13:23 +08:00
margin: 0 auto;
width: @steps-dot-size;
height: @steps-dot-size;
line-height: @steps-dot-size;
border: 0;
.@{steps-prefix-cls}-icon-dot {
float: left;
width: 100%;
height: 100%;
border-radius: @steps-dot-size / 2;
2017-01-23 16:18:49 +08:00
position: relative;
&:after {
content: '';
background: rgba(255, 255, 255, 0.001);
width: 40px;
height: 24px;
position: absolute;
top: -8px;
left: -16px;
}
&:hover {
transform: scale(1.3);
}
}
}
}
2017-02-28 15:13:23 +08:00
.@{steps-prefix-cls}-main {
display: block;
margin-top: 10px;
.@{steps-prefix-cls}-title {
padding-right: 0;
}
}
.@{steps-prefix-cls}-status-process {
.@{steps-prefix-cls}-head {
top: -1px;
&-inner {
width: @steps-current-dot-size;
height: @steps-current-dot-size;
line-height: @steps-current-dot-size;
.@{steps-prefix-cls}-icon-dot {
border-radius: @steps-current-dot-size / 2;
}
}
}
}
&.@{steps-prefix-cls}-vertical {
.@{steps-prefix-cls}-tail {
left: 2px;
height: 100%;
padding: 0;
top: 15px;
> i {
height: 100%;
width: 3px;
}
}
.@{steps-prefix-cls}-head {
top: 12px;
left: 1px;
}
.@{steps-prefix-cls}-status-process {
.@{steps-prefix-cls}-head {
left: 0;
}
}
}
}
2017-03-18 15:32:29 +08:00
@keyframes tailEffect {
to {
box-shadow: 0 0 3px 3px transparent;
}
}