与此问题类似:rails: any change to custom.css.scss make the app crash
我对custom.css.scss文件进行了更改,并且所有对颜色的引导引用都停止了。我现在手动输入这些颜色的十六进制值并加载应用程序,但我的导航栏的类现在无法正常工作。
由于某种原因,我现在有一个引用任何引导类的问题。我也不明白为什么对样式表进行微小的更改会导致我的引导样式陷入崩溃。我想我必须在其他地方遇到设置问题。
custom.css.scss:
@import "bootstrap";
/* mixins, variables, etc. */
$grayMediumLight: #eaeaea;
$gray-darker: #222;
$gray-dark: #333;
$gray: #555;
$gray-light: #999;
$gray-lighter: #eee;
相关的宝石
gem 'rails', '4.0.2'
gem 'bootstrap-sass', '2.3.2.0'
gem 'sprockets', '2.11.0'
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
除此之外,我最近将bootstrap.css和bootstrap.min.css文件添加到vendor / assets / stylesheets以及相同的.js文件以使用折叠面板类。
任何帮助非常感谢。
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, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, 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 top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require bootstrap.min
*= require_self
*= require_tree .
*/
更新:
所以我删除然后重新包含bootstrap.css和bootstrap.min.css文件,主导航栏样式重现生机。唯一仍然无效的是对导航栏中我的下拉列表的颜色和样式的引用。
从vendor / assets / javascript和vendor / assets / stylesheets文件夹中删除bootstrap文件也解决了这个问题。