Skip to content

Commit 486c174

Browse files
committed
height when control_input isn't inside control. fixes #383
1 parent d8955b5 commit 486c174

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

src/scss/tom-select.bootstrap5.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
9494
.#{$select-ns}-wrapper.form-control,
9595
.#{$select-ns}-wrapper.form-select{
9696
padding:0 !important;
97+
height: auto;
98+
box-shadow: none;
99+
display: flex;
97100
}
98101

99102
.#{$select-ns}-dropdown,
@@ -137,7 +140,6 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
137140
}
138141

139142
.#{$select-ns}-control {
140-
//min-height: $input-height; // causes wrapper to be 2px too large
141143
@include box-shadow($input-box-shadow);
142144
@include transition($input-transition);
143145
display:flex;
@@ -169,21 +171,22 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
169171

170172

171173
.#{$select-ns}-wrapper {
174+
min-height: $input-height;
175+
display:flex;
172176

173177
.input-group-sm > &,
174178
&.form-select-sm,
175179
&.form-control-sm{
180+
min-height: $input-height-sm;
176181

177182
.#{$select-ns}-control{
178-
min-height: $input-height-sm;
179183
padding: 0 .75rem;
180184
//padding: $input-padding-y-sm $input-padding-x-sm;
181185
@include border-radius($input-border-radius-sm);
182186
@include font-size($input-font-size-sm);
183187
}
184188

185189
&.has-items .#{$select-ns}-control{
186-
min-height: $input-height-sm !important;
187190
font-size: $input-font-size-sm;
188191
padding-bottom: 0;
189192
}
@@ -213,11 +216,11 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
213216
}
214217
}
215218

216-
.input-group-lg > & >,
219+
.input-group-lg > &,
217220
&.form-control-lg,
218221
&.form-select-lg{
219-
.#{$select-ns}-control{
220-
min-height: $input-height-lg;
222+
min-height: $input-height-lg;
223+
.#{$select-ns}-control{
221224
@include border-radius($input-border-radius-lg);
222225
@include font-size($input-font-size-lg);
223226
}
@@ -244,9 +247,6 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
244247

245248
.#{$select-ns}-wrapper.form-control,
246249
.#{$select-ns}-wrapper.form-select{
247-
padding: 0;
248-
height: auto;
249-
box-shadow: none;
250250

251251
.#{$select-ns}-control,
252252
&.single.input-active .#{$select-ns}-control{

src/scss/tom-select.default.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ $select-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15) !default;
1616
@include ts-caret();
1717

1818
.#{$select-ns}-wrapper {
19+
display:flex;
20+
min-height:$select-line-height + ($select-padding-y*2) + ($select-border-width *2);
21+
1922
&.multi {
2023

2124
&.has-items .#{$select-ns}-control {

src/scss/tom-select.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ $select-opacity-disabled: 0.5 !default;
4949

5050
$select-shadow-input: none !default;
5151
$select-shadow-input-focus: none !default;
52-
$select-border: 1px solid $select-color-border !default;
52+
$select-border-width: 1px !default;
53+
$select-border: $select-border-width solid $select-color-border !default;
5354
$select-dropdown-border: 1px solid $select-color-dropdown-border !default;
5455
$select-border-radius: 3px !default;
5556

0 commit comments

Comments
 (0)