Bootswatch

Bootswatch theme customization

Red Alert Security Warning for July 2021: Bootstrap is used in over 72% of websites. However, less 5% of those sites are using 5.0.2 or above and have many security vulnerabilities.

Builtwith Bootstrap Usage Statistics

Why Bootswatch Themes?

Bootswatch is a site by Thomas Park that offers free themes for Bootstrap (originally developed by Twitter). While the GetBootstrap site shows some basic examples of web pages for responsive and mobile first design, Bootswatch provides approximately two 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 the Bootstrap team and licensed by MIT, 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.scss and _bootswatch.scss 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 Bootstrap Site

The default Bootstrap site is mobile responsive, but has a very boring look

The default Twitter Bootstrap site is mobile responsive, but has a very boring look.

United Theme

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:

  1. Browse to Bootswatch.com.
  2. Click the Themes pulldown.
  3. Select your favorite theme like United.
  4. Click the theme Download pulldown.
  5. Select bootstrap.min.css and bootstrap.css.
  6. Replace the same name files in your web project with your downloads.
  7. 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 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 Bootstrap Settings

OptionSettingTrend
Navbar Height50pxTaller
Navbar ColorBlack or whiteBrand color
Navbar BrandText onlyLogo Image
TypographyHelvetica NueuGeorgia
JumbotronGrayColor or Image
ButtonsBlueBrand color
CarouselNoneHome page
Search formNoneNavbar
Social IconsNoneFooter
FooterLimitedFull-width Panel

These are the most obvious options many lazy developers don’t change leading to the criticism that all Twitter Bootstrap sites look the same.

Environment Setup

Follow the Help page at Bootswatch. The setup is almost that straight forward, except for a few exceptions:

  1. Download and run Git and Node.
  2. 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.
  3. Right-click on your repository for options like opening the shell or explorer for editing.
  4. Open Command Prompt as Administrator. Then copy the Bootswatch themes:
    git clone https://github.com/thomaspark/bootswatch.git
  5. NPM command will not be recognized until youchange directory to Bootswatch under the GitHub folder: cd bootswatch
  6. Run this command once from the Bootswatch directory to enable recompiling bootstrap CSS files with your custom changes in the SASS files:
    npm install -g grunt-cli
  7. After editing _Variables.sass and _Bootswatch.sass in the \github\bootswatch\custom folder, run this command from the Bootswatch directory to compile the changes:
    grunt swatch:custom
  8. Copy the updated bootstrap.css and bootstrap.min.css files from \custom to your your Bootstrap project and review.

Cerulean Theme

Blue is the color most commonly associated with harmony, faithfulness, and confidence. It's the favorite color of almost half of men and women.
Blue is the color most commonly associated with harmony, faithfulness, and confidence. It’s the favorite color of almost half of men and women. | Wikipedia

Popular Customizations

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:

  1. 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.
  2. Edit the variables.sass for changes in colors and fonts.
  3. Change @brand-primary for your navbar background. Button colors often match in the examples, but many people keep buttons a different color.
  4. @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.
  5. @link-color and @link-hover-color should coordinate with the theme colors for hyperlinks.
  6. Change @font-family-sans-serif settings so your site doesn’t have the default Bootstrap typography.
  7. 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.
  8. 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.
  9. @panel-footer-bg is often changed to the same color as the navbar-default-bg.
  10. Edit the bootswatch.sass 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

Once you're up to speed with making bootstrap pages and customizing a Bootswatch theme, it may be time to up your game to paid Wrapbootstrap themes. The cost is quite affordable and you can produce great results with your new skills.
Once you’re up to speed with making bootstrap pages and customizing a Bootswatch theme, it may be time to up your game to paid Wrapbootstrap themes. The cost is quite affordable and you can produce great results with your new skills. | WrapBootstrap

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 article was created because there is little clear information about recompiling boostrap.css and SASS 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 article.

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.

Kevin Fream

THANK YOU for reading and please provide any comments that would make this article better.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Leave a Reply