升级到bootstrap-sass 3.2.0的问题 [英] Issue with upgrade to bootstrap-sass 3.2.0

查看:132
本文介绍了升级到bootstrap-sass 3.2.0的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将bootstrap-sass gem升级到〜>时是否还有其他需要参考/配置的内容? 3.2.0



使用RubyMine 6.3作为编辑器,并在Gemfile中使用以下内容:

  ruby​​'2.1.2'
gem'rails','4.1.1'
gem'sass-rails','〜> 4.0.3'
gem'bootstrap-sass','3.1.1.1'

app /assets/stylesheets/application.css.scss将对

  @import'bootstrap'感到满意; 

但是,一旦bootstrap-sass gem升级到当前版本通过将Gemfile引用更改为(然后运行软件包更新):

  gem'bootstrap-sass','〜> 3.2.0'

RubyMine现在发布了 @import'bootstrap'; 语句,说无法解决导入sass / scss文件的问题



twbs / bootstrap-sass安装文档似乎无法推断出还需要其他任何东西...

解决方案

删除所有* = require_self和* = require_tree。 sass文件中的语句。而是使用@import导入Sass文件。



请勿在Sass中使用* = require,否则您的其他样式表将无法访问Bootstrap混合或变量。 / p>

Is there something else that needs to be referenced/configured when upgrading the bootstrap-sass gem to ~> 3.2.0?

Using RubyMine 6.3 as the editor and the following in the Gemfile:

ruby '2.1.2'  
gem 'rails', '4.1.1'  
gem 'sass-rails', '~> 4.0.3'  
gem 'bootstrap-sass', '3.1.1.1'  

app/assets/stylesheets/application.css.scss will be happy with

@import 'bootstrap';

However, once the bootstrap-sass gem is upgraded to its current version by changing the Gemfile reference to (and then running bundle update):

gem 'bootstrap-sass', '~> 3.2.0'  

RubyMine now has issues the @import 'bootstrap'; statement, saying "Cannot resolve import into sass/scss file".

The twbs/bootstrap-sass installation docs don't seem to infer that anything else is needed...

解决方案

Remove all the *= require_self and *= require_tree . statements from the sass file. Instead, use @import to import Sass files.

Do not use *= require in Sass or your other stylesheets will not be able to access the Bootstrap mixins or variables.

这篇关于升级到bootstrap-sass 3.2.0的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆