style: fix the problem of inconsistent styles in RTL mode (#35088)

This commit is contained in:
PCCCCCCC 2022-04-19 15:31:08 +08:00 committed by GitHub
parent dc4da79638
commit d6b230958a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,14 @@
padding-left: 16px; padding-left: 16px;
} }
.@{steps-prefix-cls}-item-subtitle {
.@{steps-prefix-cls}-rtl & {
float: left;
margin-right: 8px;
margin-left: 0;
}
}
&::after { &::after {
.@{steps-prefix-cls}-rtl & { .@{steps-prefix-cls}-rtl & {
right: 100%; right: 100%;
@ -46,6 +54,7 @@
padding-right: 0; padding-right: 0;
} }
} }
&:last-child .@{steps-prefix-cls}-item-title { &:last-child .@{steps-prefix-cls}-item-title {
.@{steps-prefix-cls}-rtl& { .@{steps-prefix-cls}-rtl& {
padding-left: 0; padding-left: 0;
@ -86,6 +95,7 @@
margin-left: 0; margin-left: 0;
text-align: right; text-align: right;
} }
.@{steps-prefix-cls}-item-title { .@{steps-prefix-cls}-item-title {
.@{steps-prefix-cls}-rtl& { .@{steps-prefix-cls}-rtl& {
padding-left: 0; padding-left: 0;
@ -187,6 +197,7 @@
} }
} }
} }
&:first-child .@{steps-prefix-cls}-icon-dot { &:first-child .@{steps-prefix-cls}-icon-dot {
.@{steps-prefix-cls}-rtl& { .@{steps-prefix-cls}-rtl& {
right: 2px; right: 2px;
@ -224,6 +235,7 @@
margin-left: 16px; margin-left: 16px;
} }
} }
// https://github.com/ant-design/ant-design/issues/18354 // https://github.com/ant-design/ant-design/issues/18354
.@{steps-prefix-cls}-item > .@{steps-prefix-cls}-item-container > .@{steps-prefix-cls}-item-tail { .@{steps-prefix-cls}-item > .@{steps-prefix-cls}-item-container > .@{steps-prefix-cls}-item-tail {
.@{steps-prefix-cls}-rtl& { .@{steps-prefix-cls}-rtl& {
@ -231,12 +243,14 @@
left: auto; left: auto;
} }
} }
.@{steps-prefix-cls}-item:first-child .@{steps-prefix-cls}-icon-dot { .@{steps-prefix-cls}-item:first-child .@{steps-prefix-cls}-icon-dot {
.@{steps-prefix-cls}-rtl& { .@{steps-prefix-cls}-rtl& {
right: 0; right: 0;
left: auto; left: auto;
} }
} }
.@{steps-prefix-cls}-item-process .@{steps-prefix-cls}-icon-dot { .@{steps-prefix-cls}-item-process .@{steps-prefix-cls}-icon-dot {
.@{steps-prefix-cls}-rtl& { .@{steps-prefix-cls}-rtl& {
right: -2px; right: -2px;
@ -247,7 +261,11 @@
// RTL Steps with progress // RTL Steps with progress
.@{steps-prefix-cls}-rtl.@{steps-prefix-cls}-with-progress.@{steps-prefix-cls}-horizontal.@{steps-prefix-cls}-label-horizontal { .@{steps-prefix-cls}-rtl.@{steps-prefix-cls}-with-progress.@{steps-prefix-cls}-horizontal.@{steps-prefix-cls}-label-horizontal {
.@{steps-prefix-cls}-item:first-child.@{steps-prefix-cls}-item-active { .@{steps-prefix-cls}-item:first-child {
padding-right: 4px; padding-right: 4px;
padding-left: 0;
&.@{steps-prefix-cls}-item-active {
padding-right: 4px;
}
} }
} }