As pointed out by others, the bootstrap-theme.css file name is very confusing. I would choose something like bootstrap-3d.css or bootstrap-fancy.css , which would be more visual from what it actually does. What the world sees as a “Bootstrap theme” is a thing you can get from BootSwatch, which is a completely different beast.
With that said, the effects are pretty nice - gradients and shadows and the like. Unfortunately, this file will hurt BootSwatch themes, so I decided to delve into what it takes to get it to play well with them.
SMALLER
Bootstrap-theme.css is created from the theme.less file in the Bootstrap source. Damaged items (starting with Bootstrap v3.2.0):
- List items
- Buttons
- Images
- Dropdowns
- Navbars
- Alerts
- Progress indicators
- List of groups
- Panel
- Wells
The theme.less file depends on:
@import "variables.less"; @import "mixins.less";
The code uses the colors defined in the variables. in several places, for example:
This is why bootstrap-theme.css will completely ruin BootSwatch themes. The good news is that BootSwatch themes are also created from .less variable files, so you can just create bootstrap-theme.css for your BootSwatch theme.
Build bootstrap-theme.css
The right way to do this is to update the theme build process, but here it is a quick and dirty way. Replace the variables.less file in the Bootstrap source with the one that was created in your Bootswatch theme, and create it and you have the bootstrap-theme.css file for your Bootswatch theme.
Creating Bootstrap itself
Building Bootstrap may seem complicated, but actually it is very simple:
- Download Bootstrap Source Code
- Download and install NodeJS
- Open a command prompt and browse to the source boot folder. Type "npm install". This will add the node_modules folder to the project and load all the Node materials you need.
- Install grunt globally (-g option) by typing "npm install -g grunt-cli"
- Rename the dist folder to dist-orig, then rebuild it by typing grunt dist. Now check that there is a new “dist” folder that contains everything you need to use your own Bootstrap build.
Done. See, that was easy, wasn't it?
ThisGuy Oct 26 '14 at 22:30 2014-10-26 22:30
source share