style: fix form item with feedback in rtl (#22222)

This commit is contained in:
Saeed Rahimi 2020-03-15 14:50:10 +03:30 committed by GitHub
parent a50c42c08b
commit c52d25d2cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 3 deletions

View File

@ -80,6 +80,10 @@
text-align: right; text-align: right;
vertical-align: middle; vertical-align: middle;
.@{form-prefix-cls}-rtl & {
text-align: right;
}
&-left { &-left {
text-align: left; text-align: left;
} }
@ -107,6 +111,11 @@
line-height: 1; line-height: 1;
content: '*'; content: '*';
.@{form-prefix-cls}-rtl & {
margin-right: 0;
margin-left: 4px;
}
.@{form-prefix-cls}-hide-required-mark & { .@{form-prefix-cls}-hide-required-mark & {
display: none; display: none;
} }

View File

@ -10,11 +10,26 @@
// ========================= Input ========================= // ========================= Input =========================
.@{ant-prefix}-input { .@{ant-prefix}-input {
padding-right: 24px; padding-right: 24px;
.@{form-prefix-cls}-rtl & {
padding-right: @input-padding-horizontal-base;
padding-left: 24px;
}
} }
// https://github.com/ant-design/ant-design/issues/19884 // https://github.com/ant-design/ant-design/issues/19884
.@{ant-prefix}-input-affix-wrapper { .@{ant-prefix}-input-affix-wrapper {
.@{ant-prefix}-input-suffix { .@{ant-prefix}-input-suffix {
padding-right: 18px; padding-right: 18px;
.@{form-prefix-cls}-rtl & {
padding-right: @input-padding-horizontal-base;
padding-left: 18px;
}
}
.@{ant-prefix}-input {
.@{form-prefix-cls}-rtl & {
padding: 0;
}
} }
} }
@ -30,10 +45,9 @@
} }
} }
.@{ant-prefix}-input-password-icon { .@{ant-prefix}-input-number {
.@{form-prefix-cls}-rtl & { .@{form-prefix-cls}-rtl & {
margin-right: 0; padding-left: 18px;
margin-left: 18px;
} }
} }
@ -95,12 +109,27 @@
.@{ant-prefix}-picker { .@{ant-prefix}-picker {
padding-right: @input-padding-horizontal-base + @font-size-base * 1.3; padding-right: @input-padding-horizontal-base + @font-size-base * 1.3;
.@{form-prefix-cls}-rtl & {
padding-right: @input-padding-horizontal-base;
padding-left: @input-padding-horizontal-base + @font-size-base * 1.3;
}
&-large { &-large {
padding-right: @input-padding-horizontal-lg + @font-size-base * 1.3; padding-right: @input-padding-horizontal-lg + @font-size-base * 1.3;
.@{form-prefix-cls}-rtl & {
padding-right: @input-padding-horizontal-lg;
padding-left: @input-padding-horizontal-lg + @font-size-base * 1.3;
}
} }
&-small { &-small {
padding-right: @input-padding-horizontal-sm + @font-size-base * 1.3; padding-right: @input-padding-horizontal-sm + @font-size-base * 1.3;
.@{form-prefix-cls}-rtl & {
padding-right: @input-padding-horizontal-sm;
padding-left: @input-padding-horizontal-sm + @font-size-base * 1.3;
}
} }
} }