Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select2 and input-prepend #16

Open
jssebastian opened this issue Jun 25, 2013 · 3 comments
Open

select2 and input-prepend #16

jssebastian opened this issue Jun 25, 2013 · 3 comments

Comments

@jssebastian
Copy link

When placing a select2 next to a bootstrap input-prepend addon, the select2 is not styled properly. It needs:

  • no rounded corners on the left side (right side for input-append)
  • same height and padding as the add-on

For this, with default bootstrap variables I am using this css:

.input-prepend .select2-container .select2-choice{
    font-size:14px;
    line-height:20px;
    height:20px;
    padding-top:4px;
    padding-bottom:4px;
}

.input-prepend .select2-container .select2-choice{
    border-radius: 0 4px 4px 0;
}

In terms of bootstrap variables, the 14px and 20px are clearly @baseFontSize and @baseLineHeight.. not sure what the 4px padding I found by trial and error should be defined as...

@michaek
Copy link
Collaborator

michaek commented Jun 27, 2013

I agree this is important. I've got similar styles in the project in which I'm using this library - I'll see about moving them upstream to address this.

@nickl-
Copy link
Collaborator

nickl- commented Jan 22, 2014

@jssebastian Please submit the changes in a PR so that we can get it into release.

I assume this will also require something on the bootstrap3 branch, please advise.

@fk
Copy link
Collaborator

fk commented Jan 26, 2014

@nickl- In the bootstrap3 branch this is taken care of ("Input Groups"), albeit sloppy:
Currently an additional CSS-class needs to be added to Bootstrap 3s .input-group container to adjust the Select2 border-radii – revisiting this I wonder why I didn't use just CSS selectors instead.

@fk fk mentioned this issue Jan 26, 2014
@fk fk added the bootstrap2 label Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants