Browse Source

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

* fix: select 多选时的 padding

* fix: RTL

* remove css

* fix: rtl 模式下 signle
pull/20883/head
xrkffgg 5 years ago
committed by 二货机器人
parent
commit
2c092df9da
  1. 15
      components/select/style/multiple.less
  2. 10
      components/select/style/single.less

15
components/select/style/multiple.less

@ -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;
}
}
}
}

10
components/select/style/single.less

@ -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;
}
}
}
}

Loading…
Cancel
Save