fix: select 多选时的 padding (#20861)

* fix: select 多选时的 padding

* fix: RTL

* remove css

* fix: rtl 模式下 signle
This commit is contained in:
xrkffgg 2020-01-13 23:39:42 +08:00 committed by 二货机器人
parent 6df1973aec
commit 2c092df9da
2 changed files with 22 additions and 3 deletions

View File

@ -126,13 +126,13 @@
.@{select-prefix-cls}-selection-placeholder {
position: absolute;
top: 0;
left: @control-padding-horizontal;
left: @input-padding-horizontal;
height: @select-height-without-border;
line-height: @select-height-without-border;
transition: all 0.3s;
.@{select-prefix-cls}-rtl& {
right: @control-padding-horizontal;
right: @input-padding-horizontal;
left: auto;
}
}
@ -170,4 +170,15 @@
.select-size('lg', @input-height-lg);
.select-size('sm', @input-height-sm);
// Size small need additional set padding
&.@{select-prefix-cls}-sm {
.@{select-prefix-cls}-selection-placeholder {
left: @input-padding-horizontal-sm;
.@{select-prefix-cls}-rtl& {
right: @input-padding-horizontal-sm;
}
}
}
}

View File

@ -58,7 +58,7 @@
padding-right: @font-size-base;
.@{select-prefix-cls}-rtl& {
padding-right: @input-padding-horizontal-base;
padding-right: 0;
padding-left: @font-size-base;
}
}
@ -157,11 +157,19 @@
// With arrow should provides `padding-right` to show the arrow
&.@{select-prefix-cls}-show-arrow .@{select-prefix-cls}-selection-search {
right: @input-padding-horizontal-sm + @font-size-base * 1.5;
.@{select-prefix-cls}-rtl& {
right: 0;
}
}
&.@{select-prefix-cls}-show-arrow .@{select-prefix-cls}-selection-item,
&.@{select-prefix-cls}-show-arrow .@{select-prefix-cls}-selection-placeholder {
padding-right: @font-size-base * 1.5;
.@{select-prefix-cls}-rtl& {
padding-right: 0;
}
}
}
}