Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
osaris opened this Issue · 10 comments

5 participants

Raphaël Emourgeon m5o Josh Pigford Andrew Toelle John W. Long
Raphaël Emourgeon

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

Raphaël Emourgeon osaris referenced this issue in twbs/bootstrap-sass
Closed

Expected a color. Got: transparent #219

m5o
Collaborator

Which Sass version are you running?

Raphaël Emourgeon

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.

Raphaël Emourgeon

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

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

Josh Pigford

I'm also experiencing this exact issue.

m5o
Collaborator
m5o commented

Is your setup definitely include sass (3.2)?

Andrew Toelle

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!

John W. Long
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

John W. Long 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.