Customization Tips for Bootswatch Themes
Bootswatch Customization Poll
What is your interest in this hub?
Why Bootswatch Themes?
Bootswatch is a site by Thomas Park that offers free themes for Twitter Bootstrap. While the GetBootstrap site shows some basic examples of web pages for responsive and mobile first design, Bootswatch provides a dozen themes showcasing various looks.
The magic for quickly changing the look and feel of a bootstrap site is updating the two Cascading Style Sheets (CSS) of boostrap.css and bootstrap.min.css. However, bootstrap is a design model that is regularly updated by Twitter, so you shouldn't just manually edit those files like traditional web development. Not only is the task daunting over pages of code, but any changes you make would have to be made again and tested with each successive version of bootstrap.
Fortunately, Bootwatch themes provide an example of the myriad bootstrap customization settings. Using the utility sites Git and Node, you can clone an existing Bootswatch theme with a framework to then just update a few settings as desired. By editing the special variables.less and bootswatch.less files, you specify aspects such as fonts, colors, and sizes. Finally, you combine your customizations with the default CSS using the command: grunt swatch.
Default Twitter Bootstrap Site
Fast and Furious
If you're just wanting some rapid prototypes or feel one of the Bootstrap themes will fit all of your needs, then you can pretty much can:
- Browse to Bootswatch.com.
- Click the Themes pulldown.
- Select your favorite theme like United.
- Click the Download pulldown.
- Select bootstrap.min.css and bootstrap.css.
- Replace the same name files in your web project with your downloads.
- View the changes and begin building pages.
You don't have to worry about compiling anything and at least you're a few steps ahead of all those lazy people, who never changed default Twitter Boostrap example of black navbar, gray panels, and blue buttons.
Step 3 lists United because it's something different that if you check, most of your competition probably has the same look and colors - text probably says the same things too. However, with just a little more effort, you can develop a custom brand and unique presence.
Default Twitter Bootstrap Settings
Black or white
Color or Image
Follow the Help page at Bootswatch. The setup is almost that straight forward, except for a few exceptions:
- Download and run Git and Node.
- Open the GitHub app and create your GitHub user name and repository. Make it simple and name the repository the same as your user name.
- Right-click on your repository for options like opening the shell or explorer for editing.
- In the GitHub Shell, copy the Bootswatch themes:
git clone https://github.com/thomaspark/bootswatch.git
- NPM command will not be recognized until you change directory to Bootswatch: cd bootswatch
- Run this command once from the Bootswatch directory to enable recompiling bootstrap CSS files with your custom changes in the LESS files:
npm install -g grunt-cli
- After editing Variables.less and Bootswatch.less in the \github\bootswatch\custom folder, run this command from the Bootswatch directory to compile the changes:
- Copy the updated bootstrap.css and bootstrap.min.css files from \custom to your your Bootstrap project and review.
Obviously, this is the point where you enter the world of personal preference and choice. Colorcombos.com is a good site for comparing color schemes. Also, here are some quick pointers to make your site different from the default bootstrap site:
- Copy the contents of theme folder to \bootswatch\custom that is closest to your final product like \bootswatch\cerulean. Blue is safe and offers a nice palette, but it seems like almost everyone has a blue website.
- Edit the variables.less for changes in colors and fonts.
- Change @brand-primary for your navbar background. Button colors often match in the examples, but many people keep buttons a different color.
- @body-bg and @text-color set the tone for a light or dark site with the background and text colors. The current trend is generally a light background, but compare or contrast with other sites in a given industry.
- @link-color and @link-hover-color should coordinate with the theme colors for hyperlinks.
- Change @font-family-sans-serif settings so your site doesn't have the default Bootstrap typography.
- Make the overall font size smaller or large by adjusting @font-size-base. My preference is a little larger, as we shouldn't really have to squint on large screens.
- The default navbar is only 50px, but most developers want their site to look different from the Bootstrap examples and like a little more height anyway by changing the @navbar-height. Obviously, the @navbar-default and @navbar-inverse settings are where you'll want to change those backgrounds and link colors.
- @panel-footer-bg is often changed to the same color as the navbar-default-bg.
- Edit the bootswatch.less to add special styling. The other themes show some good examples for portions to copy. For instance, maybe you like the shaded pulldown menus of Cyborg or the navbar button look of Slate.
More Ideas from Wrapbootstrap Themes
Bootswatch Customization Quiz
view quiz statistics
Bootswatch Customization Bottom Line
Setup and your first customization may be completed in under an hour, but you may spend a career testing and deploying various looks for any need. Sometimes it's easier just to throw the menu options, text, and images on the screen and do the theme settings afterward.
This hub was created because there is little clear information about recompiling boostrap.css and LESS files or using with themes of any kind. The content didn't really fit with any blog niche and why not provide for everyone while documenting? Hopefully, these tidbits will help others get started.
No cute animals were harmed in the making of this hub.
No sections were left blank and this media may or may not be formatted to fit your screen.
The author has no affiliation and derives no revenue from any referenced persons, organizations, or websites.
THANK YOU for reading and please provide any comments that would make this hub better.
© Kevin Fream 2015.