0

Need a second set of eyes. We're getting an error trying to use a bootstrap mixin. Oddly, extends of bootstrap classes are working fine. We're using the latest bootstrap-sass gem.

We're getting the following error:

ActionView::Template::Error (Undefined mixin 'button-variant'.

We have the following structure:

In application.css.scss

@import "bootstrap-sprockets";
@import "bootstrap";

@import "base/variables";
@import "base/mixins";
@import "base/globals";

In globals.css.scss

@import "buttons";

In buttons.css.scss:

.border-btn {
    @include button-variant($color-base, transparent, $color-base);
}

Can anyone spot the issue? As far as I can tell, things are setup correctly...

Jeffrey Guenther
  • 871
  • 10
  • 27

1 Answers1

1

You need to add import to buttons.css.scss. I'm not sure exactly why it works so in your case, but I have seen this behavior before. I found following thoughts on the matter: Proper SCSS Asset Structure in Rails, and some workaround here: http://rwilcox.tumblr.com/post/9038701675/sass-variables-and-the-rails-3-1-asset-pipeline

Community
  • 1
  • 1
Sergey Sokolov
  • 994
  • 7
  • 6