5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rails × Bootstrapで出来ること

Last updated at Posted at 2015-07-29

Railstutrialで登場するBootstrap関連のメモ
随時更新

Gems

-bootstrap-sass
 bootstrapをSassで使うためのおまじない
-Sprockets
 LESSをSassに変換するためのおまじない

bootstrap-sassの効能の一部

-LESSの変数を自発的にSassの変数に置き換えてくれるのでLESSの変数をそのまま使える
 Using LESS with Bootstrap

カスタムCSSファイルを作る

-場所とファイル名
 app/assets/stylesheets/custom.css.scss
-内容

custom.css.scss
@import "bootstrap";

Bootstrap JavaScriptライブラリをapplication.jsに追加する

app/assets/javascripts/application.js
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require turbolinks
//= require_tree .

HTMLの配色

-カラーネーム
HTML Color Names

Asset Pipelineがやってくれること

-本番環境において、CSS,Javascriptの不要な空白などを取り除いてファイルを最小化し、複数のファイルを1つにまとめてくれる

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?