私のカスタムCSSでレール内のブートストラップCSSを上書きすることはできませんし、私は非常に下部に私はレールに新しいです
@import "bootstrap-sprockets"
@import "bootstrap"
を追加することにより、ブートストラップを追加することの一部に着いたとき、このチュートリアルhttps://launchschool.com/blog/integrating-rails-and-bootstrap-part-1#css_preprocessors次ましたapplication.css.sass
それはすべて正常にうまくいった。しかし、私は尊敬されていませんでしたコード
html, body{background:#000;color:#FFF;}
のラインを持っていました。周りを見た後、私はそれがために自分のアプリケーションファイルのだということを実現:
/*
* 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 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_tree .
*= require_self
*= require custom
*/
@import "bootstrap-sprockets"
@import "bootstrap"
私は「ブートストラップ」は一番下にあるので、私はそれを移動する場合、それは、しかし、ウェブサイトで使用されるCSSであることを理解します上または他の場所で、私はエラーページを取得します。ブートストラップをインポートしたり、ページを上書きするための別の方法がありますか?
あなたは** SASSを使用している場合**構文その後、 'HTML、体{背景:#000;色:#FFF; } 'は無効です。また、[Bootstrap-SASS](https://github.com/twbs/bootstrap-sass#a-ruby-on-rails)Ruby実装のドキュメントを参照することもできます。 – vanburen
更新があるかどうか聞いてみました。おかげでFabrizio –