ruby-on-rails – 为了安装bootstrap-sass gem,我从application.
发布时间:2020-12-17 02:25:40 所属栏目:百科 来源:网络整理
导读:我正在安装bootstrap-sass gem,这行与application.scss混淆了我. 然后,删除所有* = require_self和* = require_tree.来自sass文件的语句.相反,使用@import导入Sass文件. 我删除* = require_self和* = require_tree.并用import’@require_self’替换它们并导
我正在安装bootstrap-sass gem,这行与application.scss混淆了我.
然后,删除所有* = require_self和* = require_tree.来自sass文件的语句.相反,使用@import导入Sass文件. 我删除* = require_self和* = require_tree.并用import’@require_self’替换它们并导入’@require_tree’.或者只是删除它们. 也适用于application.scss中的任何其他导入文件 *= require dataTables/jquery.dataTables *= require froala/froala_editor.min.css 我应该把它们改成 @import 'dataTables/jquery.dataTables' @import 'froala/froala_editor.min.css' 只是困惑,想要确认这里做什么. 解决方法
在使用bootstrap-sass时,从application.scss中删除所有内容,然后将以下内容添加到其中:
#"bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables" @import "bootstrap-sprockets"; @import "bootstrap"; 如果您希望加载其他scss / sass文件,可以将它们@import到application.scss /* *= require_self *= require your_css_file */ @import "bootstrap-sprockets"; @import "bootstrap"; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |