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

View File

@ -10,11 +10,26 @@
// ========================= Input =========================
.@{ant-prefix}-input {
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
.@{ant-prefix}-input-affix-wrapper {
.@{ant-prefix}-input-suffix {
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 & {
margin-right: 0;
margin-left: 18px;
padding-left: 18px;
}
}
@ -95,12 +109,27 @@
.@{ant-prefix}-picker {
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 {
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 {
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;
}
}
}