Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap Theme - variables.less - Bootswatch

How do you generate bootstrap.css file from the variables.less and bootstrap.less files from http://bootswatch.com/ ?

Compiling using lessC, I get a css file but that is way smaller than bootstrap.css. How am I supposed to change the colour in one of the themes?

Thanks a ton.

like image 840
Pratik Poddar Avatar asked Nov 27 '12 10:11

Pratik Poddar


People also ask

How do I override Bootstrap CSS variables?

Override Variables Bootstrap has its own “_variables. scss” in the “scss” folder, which contains all variables used in Bootstrap. Now, add the “abstracts” name folder in your scss folder and create “_custom-variables. scss” in that folder.

What is Bootswatch?

Bootswatch: It is an open-source project, that provides a number of free themes for bootstrap that a web developer can use. It helps the developer to get proper UI without spending hours and energy on styling different elements.


1 Answers

Bootswatch Swatchmaker is great and all but sometimes you are trying include Bootswatch themes in a more scriptable environment or need a better understanding of how Bootswatch themes are put together. Here is my method for manually compiling a Bootswatch Theme.

  1. Download Twitter Bootstrap from the source and uncompress.
  2. Move the Bootswatch files variables.less and bootswatch.less to the less/ folder, replacing the existing variables.less file.
  3. At the end of bootstrap.less, append @import "bootswatch.less";.
  4. Compile bootstrap.less. I recommend using the grunt task provided by Bootstrap.
like image 110
Tyler Johnson Avatar answered Sep 28 '22 06:09

Tyler Johnson