Reputation: 5400
I have bootstrap-sass
installed in my Rails 3.2 app. I can get bootstrap to work properly, including javascript and the (elusive) tooltips. But I cannot get the tooltips styling to work.
this is the setup I have:
application.js
//= require bootstrap
application.css.scss
*= require bootstrap_and_overrides
bootstra_and_overrides
@import "bootstrap";
# and other overrides
The interesting and baffling bit is that bootstrap popovers work fine, with the correct styling (which are somewhat based on tooltips from what I understand) but the tooltips do not. They show up down and to the left of the page, but no matter what I do the styling is not affected, not even the placement (data-placement='top') is being taken into consideration.
Even if I remove all the calls to all the CSS in my app except bootstrap the styling won't work.
Even if I include all the tooltip styling at the end of the bootstrap_and_overrides.css.scss
file they won't work. It seems almost as if the tooltip class is not getting applied to it.
Since the tooltips disappear as soon as you take the mouse out of the link, I can't inspect them to see what CSS they have applied if any.
Upvotes: 1
Views: 775
Reputation: 5400
Turns out the answer was the order of the js files. I had bootstrap.js
before some jquery-ui files that seemed to be causing a problem. This order works:
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require jquery.purr
//= require best_in_place
//= require bootstrap
I'll leave the question here in case it helps someone else.
Upvotes: 3