Integrating Bootswatch Theme with Twitter-Bootstrap-Rails Gem
Asked Answered
C

2

9

I've got a Ruby on Rails app running with Bootstrap, which I installed using the gem twitter-bootstrap-rails.

I'd now like to integrate a new Bootswatch theme, but I'm having trouble figuring out what to do.

There are four possible downloads for each theme - a bootstrap.css file, a bootstrap.min.css file, a variables.less file, and a bootswatch.less. My question is: do I need to download and add them ALL to my ~/app/assets/stylesheets folder? or do I just need a subset of those? Currently inside ~/app/assets/stylesheets are just two files: application.css and boostrap_and_overrides.css.less. LESS really throws me off here so I'm totally confused with how it works and what I need to do to add new css files with this setup. Any help is appreciated.

Canoodle answered 8/6, 2012 at 20:17 Comment(0)
A
7

You only need to download the bootstrap.css file, and rename it. The bootstrap.min.css is the same as the css file just a minified version of it. Less is just another way of writing css and accessing each property differently. Check out less. Add css file and begin integrating into html, also point html to new stylesheet.

Androecium answered 8/6, 2012 at 20:41 Comment(2)
So I'm assuming that if I throw in the bootstrap.css file, rename it to new_theme.css, and add a stylesheet_link_tag (in application.html.haml view) or require (in application.css), the new theme override the default Bootstrap theme where appropriate?Canoodle
Yes and also check out their github page, very valuable information on how to use their bootstrap.Androecium
L
5

Here's a twitter bootstrap gem for easy Bootswatch theme integration/customization for rails:

https://github.com/scottvrosenthal/twitter-bootswatch-rails

Lignocellulose answered 20/9, 2012 at 17:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.