Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Correct height adjustment for multiline inputs with input-group-lg and Bootstrap 3.2.0 #173

Merged
merged 1 commit into from Feb 23, 2015

Conversation

olegus8
Copy link
Contributor

@olegus8 olegus8 commented Oct 2, 2014

When using Bootstrap 3.2.0 and input-group-lg, tokenfield height remains fixed and multiline content is drawn outside of the input field.

There's no such problem with Bootstrap 3.0.0 though.

This fix works with both Bootstrap versions - 3.2.0 and 3.0.0.

olegus8 added a commit to olegus8/meteor-boostrap-tokenfield that referenced this pull request Oct 2, 2014
@ragulka
Copy link
Member

ragulka commented Oct 21, 2014

Interesting. I haven't had a chance to test with 3.2.0 yet, but is the !important part really necessary?

@olegus8
Copy link
Contributor Author

olegus8 commented Oct 22, 2014

Yep, I think it's ugly too. Here's what happens.

The offending element is <div class="tokenfield form-control">. It inherits height: auto style from .input-group-lg .tokenfield selector of Tokenfield's CSS and height: 46px from .input-group-lg > .form-control selector of Bootstrap's CSS.

Both selectors have same specificity, so they're resolved by order.

I thought it might be less fragile to put !important, so that the result doesn't depend on whether Tokenfield's CSS is included before Bootstrap's or vice versa.

If you have a better solution, I'm open for suggestions.

@olegus8
Copy link
Contributor Author

olegus8 commented Feb 2, 2015

You know, after careful consideration, I think it will do without !important. I'm using it with Meteor, which takes care of proper loading order. I updated and rebased my branch.

Any chances to get this PR merged?

Thanks for the great widget by the way! Coolest token field I've seen so far!

olegus8 added a commit to olegus8/meteor-boostrap-tokenfield that referenced this pull request Feb 3, 2015
ragulka added a commit that referenced this pull request Feb 23, 2015
Correct height adjustment for multiline inputs with input-group-lg and Bootstrap 3.2.0
@ragulka ragulka merged commit 9967e36 into sliptree:master Feb 23, 2015
@olegus8
Copy link
Contributor Author

olegus8 commented Feb 23, 2015

Thanks man, you're awesome!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants