alessani/bootstrap-colorpicker-rails — pull request #9 by wjlroe (2013-04-26 17:10:02+00:00)
Title: Fix less css error

This pull request fixes a bug with the CSS that meant that a Less mixin had been left included in the CSS. When assets were compiled with the bootstrap-colorpicker-rails CSS included, the compiler died and complained about ".border-radius" invalid CSS.

This pull request fixes that by way of making a build process for the CSS. It works by adding bootstrap and bootstrap-colorpicker as submodules, including what's necessary from them (in order to compile to the minimum viable CSS) and fixing the image URLs (so that they match the asset pipeline's convention of `/assets/#{image_name}`.

Updating from upstream should be fairly easy now, just pull updates from the submodules, as detailed in the README from this PR, and build the CSS again with `bundle exec rake css`.

I had to copy over 2 mixins from bootstrap to make this work - `.clearfix` and `.border-radius(@radius)`. The alternative was importing `mixins.less` but that would have imported all kinds of CSS that wasn't necessary. The upshot of this is that if/when the upstream bootstrap-colorpicker Less includes different/more mixins, they may need to be included, or it may be easier to simply import all the mixins and accept the tradeoff of a larger CSS file that likely duplicates definitions in people's bootstrap stylesheets.