我在app/assets/stylesheets/scaffolds.scss
:中有以下CSS
.input-container {
@include make-lg-column(3);
}
当我加载页面时,我得到以下错误:
未定义的mixin‘make lg column‘。
我在app/assets/stylesheets/bootstrap_and_overrides.css.less
:中有以下行
@import "twitter/bootstrap/variables.less";
@import "twitter/bootstrap/mixins.less";
这就是我在app/assets/stylesheets/application.css
:中的内容
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
* vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require bootstrap_and_overrides
*= require_tree .
*= require_self
*/
如有任何关于如何解决此问题的建议,我们将不胜感激。
您似乎在SCSS文件中使用了带有LESS的引导程序。我建议试试SASS版本。
# Gemfile
gem 'bootstrap-sass', '~> 3.3.7'
gem 'sass-rails', '>= 3.2'
# SCSS file
@import "bootstrap-sprockets";
@import "bootstrap";