Skip to content

Conversation

@KentShikama
Copy link
Contributor

Current Default Look/Behavior

Currently, a bootstrap-combobox for the inline form looks as expected on the on the desktop.

screen shot 2015-01-14 at 9 43 54 pm

However on screens that are smaller than 768px the inline form bootstrap-combobox does not span the entire width.

screen shot 2015-01-14 at 9 42 57 pm

Both images are screenshots from http://bootstrap-combobox-test.herokuapp.com.

This may not look so problematic in the example above. However, when you insert the bootstrap-combobox in an inline form with other bootstrap inputs, the apparent difference in consistency becomes a bit more obvious. For example, here is an image of a bootstrap-combobox among a search and month inputs.

When the screen is > 768px:

screen shot 2015-01-14 at 9 40 22 pm

When the screen is < 768px:

screen shot 2015-01-14 at 9 41 52 pm

The combobox when the screen is < 768px seems to be out of place.

Proposed Change in Default Look/Behavior

I believe the bootstrap-combobox would be more consistent with the bootstrap framework if it spanned the width of the screen for screen's less than 768px. In Bootstrap 3.3.1's forms.less file, the form-inline class has been implemented to only have an effect when the screen is > 768px:

// From boostrap-3.3.1/less/forms.less

// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
// forms begin stacked on extra small (mobile) devices and then go inline when
// viewports reach <768px.
//
// Requires wrapping inputs and labels with `.form-group` for proper display of
// default HTML form controls and our custom form controls (e.g., input groups).
//
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.

.form-inline {

  // Kick in the inline
  @media (min-width: @screen-sm-min) {
    // Inline-block all the things for "inline"
    .form-group {
      display: inline-block;
      margin-bottom: 0;
      vertical-align: middle;
    }

// etc

If the less/css file could just wrap a media query around the form-inline class, the default look/behavior of the bootstrap-combobox would be more consistent. The resulting changes for the two examples above will look as follows:

screen shot 2015-01-14 at 9 43 32 pm

screen shot 2015-01-14 at 9 40 40 pm

wagedomain added a commit that referenced this pull request Jan 16, 2016
Change look/behavior of combobox in an inline form when viewport is less than 768px
@wagedomain wagedomain merged commit 8ee398d into danielfarrell:master Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants