In some of our projects at work we end up using
display: inline-block to help with styling. There is a nasty side effect if you are using this with Haml on Rails. Haml on Rails will default to using ugly mode in production, but not ugly mode in development. Ugly mode will compress HTML to reduce spaces which messes up code that uses
I typically run into this while using Bootstrap mini-buttons in a table:
In my eyes it is safer to enable ugly mode by default then risking an error in production.
Turn on ugly mode by putting this in your
Haml::Template.options[:ugly] = true
With Rails 4 I needed to put it in
config/environments.rb to make it work.