Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bootstrap 3 style fixes for using Typeahead.js
.twitter-typeahead .tt-query,
.twitter-typeahead .tt-hint {
margin-bottom: 0;
}
.tt-hint {
display: block;
width: 100%;
height: 38px;
padding: 8px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #999;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #cccccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}
.tt-menu {
min-width: 160px;
margin-top: 2px;
padding: 5px 0;
background-color: #ffffff;
border: 1px solid #cccccc;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
background-clip: padding-box;
}
.tt-suggestion {
display: block;
padding: 3px 20px;
}
tt-suggestion:hover {
color: #fff;
background-color: #428bca;
}
.tt-suggestion.tt-is-under-cursor a {
color: #fff;
}
.tt-suggestion p {
margin: 0;
}
@agustik

This comment has been minimized.

Copy link

@agustik agustik commented Oct 15, 2015

Typo,
Line 39; Should start with . as it is a class :)
.tt-suggestion:hover {}

@mixisLv

This comment has been minimized.

Copy link

@mixisLv mixisLv commented Apr 13, 2016

fixed typo and tt-suggestion.tt-cursor selector: https://gist.github.com/mixisLv/f7872a90a8a31157e80364f08c955102

@cAstraea

This comment has been minimized.

Copy link

@cAstraea cAstraea commented Apr 15, 2016

Hello , didn't work for me can you check on http://jsfiddle.net/caim/ktsvbg5p/ ?
I'm having the same problem only in reverse , the styles are good for bootstrap 3 but bad for 2 . So would need to fix them in 2 ? How to proceed

@mixisLv

This comment has been minimized.

Copy link

@mixisLv mixisLv commented Apr 22, 2016

I don't see any problems.
Bootstrap 2: http://jsfiddle.net/ktsvbg5p/9/
Bootstrap 3: http://jsfiddle.net/ktsvbg5p/10/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.