Search code examples
rubytwitter-bootstrapcompass-sasssass

Disable 'asset-url' for Compass + Bootstrap SASS style


I have an non-ruby project, say just static page, where I want to use Compass + Twitter Bootstrap SASS for styling.

Btw, Compass generates css that have asset functions, like:

[class^="icon-"], [class*=" icon-"] {
  background-image: asset-url("glyphicons-halflings.png", image);
}

As I understand this asset-url function should be processed by an RoR post-processor, and I can't use this CSS as is.

I need just:

[class^="icon-"], [class*=" icon-"] {
  background-image: url("/images/glyphicons-halflings.png");
}

Is there any way to configure Compass or Bootstrap SASS to generate valid CSS, w/o any ruby-specific stuff inside?


Solution

  • Compass prioritizes local versions of code over the gem version, which is great for developing your own extensions (building/installing every time you make a minor change while testing is a bit of a pain). Removing the local version will allow the gem version to take over.