Fix steps fixed width, close #5083

This commit is contained in:
afc163 2017-02-28 15:13:23 +08:00
parent 69d9d1edda
commit bbfc131a85
2 changed files with 20 additions and 32 deletions

View File

@ -23,6 +23,7 @@
@steps-small-icon-size: 18px;
@steps-dot-size: 5px;
@steps-current-dot-size: 7px;
@steps-desciption-max-width: 120px;
.@{steps-prefix-cls} {
font-size: 0;
@ -349,7 +350,7 @@
visibility: hidden;
}
.@{steps-prefix-cls}-description {
max-width: 120px;
max-width: @steps-desciption-max-width;
}
.@{steps-prefix-cls}-item:not(:first-child) .@{steps-prefix-cls}-head {
padding-left: 10px;
@ -357,43 +358,21 @@
}
}
.@{steps-prefix-cls}-label-vertical {
.@{steps-prefix-cls}-tail {
padding: 0 32px 0 60px;
}
.@{steps-prefix-cls}-dot {
.@{steps-prefix-cls}-item {
.@{steps-prefix-cls}-step {
display: inline-block;
text-align: center;
width: 120px;
width: @steps-desciption-max-width;
}
&:not(:first-child) .@{steps-prefix-cls}-head {
margin-left: 0;
padding-left: 0;
}
}
.@{steps-prefix-cls}-item:not(:first-child) .@{steps-prefix-cls}-head {
margin-left: 0;
padding-left: 0;
}
.@{steps-prefix-cls}-head {
display: inline-block;
padding-right: 10px;
&-inner {
margin: 0 auto;
}
}
.@{steps-prefix-cls}-main {
display: block;
margin-top: 10px;
.@{steps-prefix-cls}-title {
padding-right: 0;
}
.@{steps-prefix-cls}-description {
text-align: left;
}
}
}
.@{steps-prefix-cls}-dot {
.@{steps-prefix-cls}-tail {
padding: 0 0 0 60px;
margin: 0 0 0 @steps-desciption-max-width / 2;
padding: 0;
width: 100%;
top: 1px;
@ -402,8 +381,10 @@
}
}
.@{steps-prefix-cls}-head {
display: inline-block;
padding-right: 0;
&-inner {
margin: 0 auto;
width: @steps-dot-size;
height: @steps-dot-size;
line-height: @steps-dot-size;
@ -430,6 +411,13 @@
}
}
}
.@{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;

View File

@ -59,7 +59,7 @@
"rc-rate": "~1.1.2",
"rc-select": "~6.7.1",
"rc-slider": "~6.1.0",
"rc-steps": "~2.3.0",
"rc-steps": "~2.4.0",
"rc-switch": "~1.4.2",
"rc-table": "~5.2.13",
"rc-tabs": "~7.1.0",