diff --git a/components/steps/__tests__/__snapshots__/demo.test.js.snap b/components/steps/__tests__/__snapshots__/demo.test.js.snap index 74eb8fd2da..9864dc41aa 100644 --- a/components/steps/__tests__/__snapshots__/demo.test.js.snap +++ b/components/steps/__tests__/__snapshots__/demo.test.js.snap @@ -2794,6 +2794,274 @@ Array [ ] `; +exports[`renders ./components/steps/demo/steps-in-steps.md correctly 1`] = ` +Array [ +
+ + +
, +
+
+
+
+
+ + 1 + +
+
+
+ Finished +
+
+
+
+
+
+
+
+
+ + 1 + +
+
+
+ Finished +
+
+ This is a description. +
+
+
+
+
+
+
+
+ + 2 + +
+
+
+ In Progress +
+
+ This is a description. +
+
+
+
+
+
+
+
+ + 3 + +
+
+
+ Waiting +
+
+ This is a description. +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + 2 + +
+
+
+ In Progress +
+
+ This is a description. +
+
+
+
+
+
+
+
+ + 3 + +
+
+
+ Waiting +
+
+ This is a description. +
+
+
+
+
, +] +`; + exports[`renders ./components/steps/demo/vertical.md correctly 1`] = `
{ + const [size, setSize] = useState('default'); + const horizontalSteps = ( + + + + + + + + ); + return ( + <> + setSize(e.target.value)} + > + Small + Default + + + + + + + + ); +}; + +ReactDOM.render(, mountNode); +``` diff --git a/components/steps/style/index.less b/components/steps/style/index.less index 6ce2f0ed99..f82359952c 100644 --- a/components/steps/style/index.less +++ b/components/steps/style/index.less @@ -41,7 +41,7 @@ } &:last-child { - flex: none; + flex: none !important; } &:last-child > &-container > &-tail, @@ -123,13 +123,13 @@ } .step-item-status(wait); .step-item-status(process); - &-process &-icon { + &-process > &-container > &-icon { background: @process-icon-color; .@{steps-prefix-cls}-icon { color: @process-icon-text-color; } } - &-process &-title { + &-process > &-container > &-title { font-weight: 500; } .step-item-status(finish); diff --git a/components/steps/style/rtl.less b/components/steps/style/rtl.less index 3b3aa5036b..11daa06c3d 100644 --- a/components/steps/style/rtl.less +++ b/components/steps/style/rtl.less @@ -137,10 +137,6 @@ // vertical .steps-vertical() { .@{steps-prefix-cls}-item { - .@{steps-prefix-cls}-rtl& { - padding-right: 0 !important; - } - &-icon { .@{steps-prefix-cls}-rtl& { float: right; @@ -251,3 +247,12 @@ } } } + +@media (max-width: @screen-xs) { + .@{steps-prefix-cls}-rtl.@{steps-prefix-cls}-horizontal.@{steps-prefix-cls}-label-horizontal { + // https://github.com/ant-design/ant-design/issues/27498 + .@{steps-prefix-cls}-item { + padding-right: 0 !important; + } + } +} diff --git a/components/steps/style/vertical.less b/components/steps/style/vertical.less index 2c04dc4391..fec744b46c 100644 --- a/components/steps/style/vertical.less +++ b/components/steps/style/vertical.less @@ -4,7 +4,7 @@ .@{steps-prefix-cls}-item { display: block; flex: 1 0 auto; - padding-left: 0 !important; + padding-left: 0; overflow: visible; &-icon { @@ -75,5 +75,10 @@ @media (max-width: @screen-xs) { .@{steps-prefix-cls}-horizontal.@{steps-prefix-cls}-label-horizontal { .steps-vertical; + + // https://github.com/ant-design/ant-design/issues/27498 + .@{steps-prefix-cls}-item { + padding-left: 0 !important; + } } }