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

osaris opened this Issue Dec 13, 2012 · 10 comments


None yet

5 participants


I have this error while compiling mixins

Expected a color. Got: transparent
  (in /home/raphael/sites/ci.imagineapp.com/bennett/app/assets/stylesheets/application.css.sass)
/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 Dec 13, 2012

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/ci.imagineapp.com/bennett$ 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 Jan 2, 2013

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


I'm also experiencing this exact issue.

m5o commented Feb 4, 2013

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 http://compass-style.org/reference/compass/css3/opacity/

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: https://github.com/twbs/bootstrap-sass

@jlong jlong closed this Apr 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment