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

Closed
osaris opened this Issue Dec 13, 2012 · 10 comments

Projects

None yet

5 participants

@osaris

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-2.2.1.1/vendor/assets/stylesheets/bootstrap/_mixins.scss:457:in `gradient- striped'

Problem looks to be here :

https://github.com/jlong/sass-twitter-bootstrap/blob/master/lib/_mixins.scss#L443

@osaris osaris referenced this issue in twbs/bootstrap-sass Dec 13, 2012
Closed

Expected a color. Got: transparent #219

@m5o
Collaborator

Which Sass version are you running?

@osaris

sass-3.2.3

@m5o
Collaborator

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.

@osaris

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.2.1.1, 2.0.3)
sass (3.2.3)
sass-rails (3.2.5)
sass-rails-bootstrap (2.1.1)
@m5o
Collaborator
m5o commented Jan 2, 2013

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

@Shpigford

I'm also experiencing this exact issue.

@m5o
Collaborator
m5o commented Feb 4, 2013

Is your setup definitely include sass (3.2)?

@brevity

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!

@jlong
Owner

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