From 306a5699a77287ebf8f51ff09cc71d1d185f6ee2 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 25 Sep 2017 11:25:57 +0800 Subject: [PATCH] Better responsive Steps --- components/steps/style/index.less | 1 + components/steps/style/vertical.less | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) 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; + } +}