Skip to content

Commit c1102df

Browse files
authored
refactor: update select style (#3781)
1 parent 7744dd0 commit c1102df

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

components/form/style/index.less

+3-3
Original file line numberDiff line numberDiff line change
@@ -435,14 +435,14 @@ form {
435435

436436
//select
437437
.@{ant-prefix}-select {
438-
&-selection {
438+
&-selector {
439439
border-color: @warning-color;
440440
&:hover {
441441
border-color: @warning-color;
442442
}
443443
}
444-
&-open .@{ant-prefix}-select-selection,
445-
&-focused .@{ant-prefix}-select-selection {
444+
&-open .@{ant-prefix}-select-selector,
445+
&-focused .@{ant-prefix}-select-selector {
446446
.active(@warning-color);
447447
}
448448
}

components/input/style/mixin.less

+10-10
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,16 @@
170170
.@{ant-prefix}-select {
171171
margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal-base);
172172

173-
.@{ant-prefix}-select-selection {
174-
margin: -1px;
173+
&.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
174+
.@{ant-prefix}-select-selector {
175175
background-color: inherit;
176176
border: @border-width-base @border-style-base transparent;
177177
box-shadow: none;
178178
}
179179

180180
&-open,
181181
&-focused {
182-
.@{ant-prefix}-select-selection {
182+
.@{ant-prefix}-select-selector {
183183
color: @primary-color;
184184
}
185185
}
@@ -204,7 +204,7 @@
204204
border-bottom-right-radius: 0;
205205

206206
// Reset Select's style in addon
207-
.@{ant-prefix}-select .@{ant-prefix}-select-selection {
207+
.@{ant-prefix}-select .@{ant-prefix}-select-selector {
208208
border-top-right-radius: 0;
209209
border-bottom-right-radius: 0;
210210
}
@@ -236,7 +236,7 @@
236236
border-bottom-left-radius: 0;
237237

238238
// Reset Select's style in addon
239-
.@{ant-prefix}-select .@{ant-prefix}-select-selection {
239+
.@{ant-prefix}-select .@{ant-prefix}-select-selector {
240240
border-top-left-radius: 0;
241241
border-bottom-left-radius: 0;
242242
}
@@ -254,11 +254,11 @@
254254
}
255255

256256
// Fix https://github.com/ant-design/ant-design/issues/5754
257-
&-lg .@{ant-prefix}-select-selection--single {
257+
&-lg .@{ant-prefix}-select-single .@{ant-prefix}-select-selector {
258258
height: @input-height-lg;
259259
}
260260

261-
&-sm .@{ant-prefix}-select-selection--single {
261+
&-sm .@{ant-prefix}-select-single .@{ant-prefix}-select-selector {
262262
height: @input-height-sm;
263263
}
264264

@@ -304,7 +304,7 @@
304304
}
305305

306306
// reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
307-
& > .@{ant-prefix}-select > .@{ant-prefix}-select-selection,
307+
& > .@{ant-prefix}-select > .@{ant-prefix}-select-selector,
308308
& > .@{ant-prefix}-calendar-picker .@{ant-prefix}-input,
309309
& > .@{ant-prefix}-select-auto-complete .@{ant-prefix}-input,
310310
& > .@{ant-prefix}-cascader-picker .@{ant-prefix}-input,
@@ -328,7 +328,7 @@
328328
}
329329

330330
& > *:first-child,
331-
& > .@{ant-prefix}-select:first-child > .@{ant-prefix}-select-selection,
331+
& > .@{ant-prefix}-select:first-child > .@{ant-prefix}-select-selector,
332332
& > .@{ant-prefix}-calendar-picker:first-child .@{ant-prefix}-input,
333333
& > .@{ant-prefix}-select-auto-complete:first-child .@{ant-prefix}-input,
334334
& > .@{ant-prefix}-cascader-picker:first-child .@{ant-prefix}-input,
@@ -339,7 +339,7 @@
339339
}
340340

341341
& > *:last-child,
342-
& > .@{ant-prefix}-select:last-child > .@{ant-prefix}-select-selection,
342+
& > .@{ant-prefix}-select:last-child > .@{ant-prefix}-select-selector,
343343
& > .@{ant-prefix}-calendar-picker:last-child .@{ant-prefix}-input,
344344
& > .@{ant-prefix}-select-auto-complete:last-child .@{ant-prefix}-input,
345345
& > .@{ant-prefix}-cascader-picker:last-child .@{ant-prefix}-input,

0 commit comments

Comments
 (0)