snapappointments / bootstrap-select

:rocket: The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more.
https://developer.snapappointments.com/bootstrap-select/
MIT License
9.85k stars 2.72k forks source link

Ability to customize overall size of select box #2162

Open jorvis opened 5 years ago

jorvis commented 5 years ago

I'm making a data-heavy display with compact form controls and bootstrap-select seems to fit all my needs except it doesn't seem to have support for sizing.

In bootstrap3 my elements were all input-xs. Now with bootstrap4 that's been removed, so they're form-control-sm.

Are there options to make bootstrap-select elements at least as small as form-control-sm? They look totally out of place with the size as they render by default.

marlenesco commented 5 years ago

This feature would be awesome using bootstrap breakpoints [xs-sm-md-lg].

caseyjhol commented 5 years ago

Can you link me to an example? Adding the sizing classes to the select element seems to work for me: https://plnkr.co/edit/pp1OTYB9dizWzoaD1hOw?p=preview.

marlenesco commented 5 years ago

@caseyjhol Yep, your preview works fine, but it using bootstrap 4, I would this feature in bs3 also

caseyjhol commented 5 years ago

@marlenesco I'm debating whether or not to include a built-in feature to add sizing classes. The Bootstrap 4 sizing classes work well, and for Bootstrap 3, you can wrap the select in a div with the form-group-sm or form-group-lg class. If Bootstrap 3 wasn't on its way out, I'd be more eager to do it. If there's enough support, though, I'll consider it further. At the very least, though, sizing info should be added to the documentation.

marlenesco commented 5 years ago

@caseyjhol I understand your point, bs3 is an old version, I have to upgrade it for many reasons. Thank you and have a nice week.