Skip to content

Commit 0cc7a65

Browse files
susnuxbackportbot[bot]
authored andcommitted
fix(NcSelect): use shared scss mixin to apply new input design changes
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent c1a084c commit 0cc7a65

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

src/components/NcSelect/NcSelect.vue

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ export default {
325325
<VueSelect
326326
class="select"
327327
:class="{
328+
'select--dark': isDark,
329+
'select--legacy': isLegacy,
328330
'select--no-wrap': noWrap,
329331
'user-select': userSelect,
330332
}"
@@ -1013,6 +1015,8 @@ export default {
10131015
</script>
10141016
10151017
<style lang="scss">
1018+
@use '../../assets/input-border.scss' as border;
1019+
10161020
body {
10171021
/**
10181022
* Set custom vue-select CSS variables.
@@ -1082,7 +1086,7 @@ body {
10821086
10831087
.v-select.select {
10841088
/* Override default vue-select styles */
1085-
min-height: var(--default-clickable-area);
1089+
min-height: calc(var(--default-clickable-area) - 2 * var(--border-width-input));
10861090
min-width: 260px;
10871091
margin: 0 0 var(--default-grid-baseline);
10881092
@@ -1127,7 +1131,7 @@ body {
11271131
.vs__dropdown-toggle {
11281132
position: relative;
11291133
max-height: 100px;
1130-
padding: 0;
1134+
padding: var(--border-width-input);
11311135
overflow-y: auto;
11321136
}
11331137
@@ -1141,15 +1145,22 @@ body {
11411145
}
11421146
11431147
&.vs--open .vs__dropdown-toggle {
1144-
border-width: var(--border-width-input-focused);
1145-
outline: 2px solid var(--color-main-background);
11461148
border-color: var(--color-main-text);
11471149
border-bottom-color: transparent;
1150+
border-bottom-left-radius: 0;
1151+
border-bottom-right-radius: 0;
1152+
border-style: solid;
1153+
border-width: var(--border-width-input-focused);
1154+
outline: 2px solid var(--color-main-background);
1155+
padding: 0;
11481156
}
11491157
1150-
&:not(.vs--disabled, .vs--open) .vs__dropdown-toggle:hover {
1151-
outline: 2px solid var(--color-main-background);
1152-
border-color: var(--color-main-text);
1158+
&:not(.vs--disabled, .vs--open) {
1159+
.vs__dropdown-toggle:active,
1160+
.vs__dropdown-toggle:focus-within {
1161+
outline: 2px solid var(--color-main-background);
1162+
border-color: var(--color-main-text);
1163+
}
11531164
}
11541165
11551166
&.vs--disabled {
@@ -1216,6 +1227,10 @@ body {
12161227
}
12171228
}
12181229
1230+
.vs__dropdown-toggle {
1231+
@include border.inputLikeBorder('.select--dark', '.select--legacy', var(--vs-border-color));
1232+
}
1233+
12191234
.vs__dropdown-menu {
12201235
border-width: var(--border-width-input-focused) !important;
12211236
border-color: var(--color-main-text) !important;

0 commit comments

Comments
 (0)