Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Expected a color. Got: transparent while compiling mixins #47

osaris opened this Issue · 10 comments

5 participants


I have this error while compiling mixins

Expected a color. Got: transparent
  (in /home/raphael/sites/
/var/lib/gems/1.9.1/gems/bootstrap-sass- `gradient- striped'

Problem looks to be here :

@osaris osaris referenced this issue in twbs/bootstrap-sass

Expected a color. Got: transparent #219


Which Sass version are you running?




Sure? Your Gemfile.lock referenced to 3.1.15

Please run gem update sass or bundle update sass I'm not sure which one is right.


bennett isn't my project and I have updated gems locally, here are the gems installed :

hydrogen:/home/raphael/sites/$ gem list | grep sass
bootstrap-sass (, 2.0.3)
sass (3.2.3)
sass-rails (3.2.5)
sass-rails-bootstrap (2.1.1)
m5o commented

Can someone else reproduce this behaviour? in my senarios 'transparent' works well


I'm also experiencing this exact issue.

m5o commented

Is your setup definitely include sass (3.2)?


You must also have compass installed. This issue is caused by the compass opacity mixin overriding the one declared at lib/_mixins.scss#L443.

Here's the Compass version

The Compass mixin expects "A number between 0 and 1, where 0 is transparent and 1 is opaque." Whereas our custom opacity mixin wants us to use a range from 0 to 100.

// lib/_mixins.css expects this
@include opacity(85);

//While Compass wants this
@include opacity(.85);

// Compass wins!

// Code Fails :-(

I'd suggest rewriting the custom mixin to fall inline with Compass, and just update the @includes in the bootstrap scss files. (there's only ten of them).

Props jlong, this project's been pretty helpful introducing me Sass!


Closing as there is now an official Bootstrap port! Please add an issue there if this is still a problem:

@jlong jlong closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.