maxim / bootswatch-rails

Bootswatches converted to SCSS ready to use in Rails asset pipeline.
MIT License
489 stars 84 forks source link

Undefined Mixin Bug #81

Closed joncalhoun closed 8 years ago

joncalhoun commented 9 years ago

Thanks for creating this gem!

Perhaps I am doing something wrong, but I keep running into an issue that is getting frustrating. I keep getting an Undefined mixin 'gradient-vertical-three-colors'. error.

My first thought was that I need to import bootstrap/mixins, but if I do that the theme still doesn't appear to be correct (wrong color text in nav bar, etc), so I suspect something else is going on.

Any idea what I can do to try to resolve the issue? Happy to try to push a PR if we can figure out the underlying issue.

Here is my app.scss:

// Example using 'Cerulean' bootswatch

//Import bootstrap-sprockets
@import "bootstrap-sprockets";

// Import cerulean variables
@import "bootswatch/cerulean/variables";

// Then bootstrap itself
@import "bootstrap";

// And finally bootswatch style itself
@import "bootswatch/cerulean/bootswatch";

I am using ruby 2.2.2p95 and rails 4.2.3, and my gemfile is shown below (important parts).

    bootstrap-sass (3.3.5.1)
      autoprefixer-rails (>= 5.0.0.1)
      sass (>= 3.3.0)

    bootswatch-rails (3.3.5)
      railties (>= 3.1)

    sass-rails (5.0.3)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (~> 1.1)
emimarz commented 8 years ago

me too +1 But I resolve this downloading this file https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/mixins/_gradients.scss and copy it to theme folder, in the same folder than _variables.scss and _bootwatch.scss and add the lines

@import 'variables'; @import 'gradients';

inside _bootswatch.scss

best Emiliano

Makapoxa commented 8 years ago

Had this issue, solved it with adding

@import "bootstrap/mixins";

before

@import "bootstrap"
esbanarango commented 8 years ago

Thanks @Makapoxa