diff --git a/components/steps/style/index.less b/components/steps/style/index.less index a36791417b..19e51d3555 100644 --- a/components/steps/style/index.less +++ b/components/steps/style/index.less @@ -140,6 +140,7 @@ .@{steps-prefix-cls}-horizontal:not(.@{steps-prefix-cls}-label-vertical) { .@{steps-prefix-cls}-item { margin-right: 10px; + white-space: nowrap; &:last-child { margin-right: 0; } diff --git a/components/steps/style/vertical.less b/components/steps/style/vertical.less index 77d6a9d75f..638e35660c 100644 --- a/components/steps/style/vertical.less +++ b/components/steps/style/vertical.less @@ -1,4 +1,4 @@ -.@{steps-prefix-cls}-vertical { +.steps-vertical() { display: block; .@{steps-prefix-cls}-item { display: block; @@ -35,6 +35,10 @@ } } + > .@{steps-prefix-cls}-item:not(:last-child) > .@{steps-prefix-cls}-item-tail { + display: block; + } + > .@{steps-prefix-cls}-item > .@{steps-prefix-cls}-item-content > .@{steps-prefix-cls}-item-title { &:after { display: none; @@ -53,3 +57,13 @@ } } } + +.@{steps-prefix-cls}-vertical { + .steps-vertical; +} + +@media (max-width: @screen-xs) { + .@{steps-prefix-cls}-horizontal.@{steps-prefix-cls}-label-horizontal { + .steps-vertical; + } +}