升级到bootstrap

编程入门 行业动态 更新时间:2024-10-28 06:27:01
本文介绍了升级到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

本文发布于:2023-07-15 18:07:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1112847.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:升级到   bootstrap

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!