Bootstrap

The Bootstrap Blog

News and announcements for all things Bootstrap, including new releases and Bootstrap Themes.

Talking about Bootstrap

There is a thread on the mailing list about how to describe Bootstrap and instead of isolating our response to just one email, I’ll just blog about it. As it stands, some folks are unsure how to describe Bootstrap to those unfamiliar with it. So here it is, straight from the official horse’s mouth.

Name

Casually, it’s just Bootstrap. That’s noun and verb, for those wondering—Bootstrap the project and “to Bootstrap a project”, respectively. Formally, we call it Twitter Bootstrap, a change that came with v2.0.0. Previously we called it “Bootstrap, from Twitter” to emphasize the project over our employer, but it just became too verbose and awkward to say.

Related, the shorthand abbreviation we use is BS—not TB, TBS, or TwBs. I don’t know why, but this feels better than TB since that’s the name of an infectious disease and all that.

Description

We worked at this for a good bit before setting on our current tagline, “Simple and flexible HTML, CSS, and JavaScript for popular user interface components and interactions.” Previously, it was much more descriptive to the framework’s contents, and thus quite long and wordy. We wanted to convey the technical details properly heading into 2.0.0 (when we changed the tagline), but without the bulk. Instead, we focus on the roles Bootstrap can assist folks with: HTML, CSS, and JavaScript. Any other description is fine, but I wanted to share some insight into the official tagline just for context.

Framework

Another focal point in the email thread was the question of referring to Bootstrap as a framework. That’s accurate enough for sure, but also somewhat limiting depending on how you want to use it. Holistically, Bootstrap certainly is a framework (or toolkit or whatever) for prototyping and building production ready stuff on the web. That said, on an individual component level, Bootstrap is a tool for performing common web development tasks faster and easier.


So there you have it, a quick low-down on how we’re thinking and talking about Bootstrap. When it comes right down to it, Bootstrap is whatever you want to make of it, so dive in and see where it can help you out the most.

Bootstrap 2.0.3 released

Today we’re releasing Bootstrap 2.0.3, another bugfix release that aims to squash as many regressions and documentation inaccuracies as possible. There are almost 100 closed issues in the 2.0.3 milestone on GitHub, but below is a comprehensive list of the most important fixes with clear explanations of what’s changed.

Makefile

In the spirit of always improving the LESS functionality and build tools, we’ve updated our makefile to utilize JSHint and Recess, linters for JavaScript and CSS. To continue to run make via Terminal, do the following:

$ npm install -g recess jshint

We’ve also removed the bootstrap.zip file from the repository, so make runs much faster as it has no need to compress any files. For more info, see the updated readme.

HTML and CSS

  • Overhauled the responsive utility classes to simplify required CSS, add !important to all declarations, and use display: inherit in place of display: block to account for different types of elements.
  • Removed > from fluid grid column selectors, meaning every element with a .span* class within a .row-fluid will use percentage widths instead of fixed-pixels.
  • Fixed regression in responsive images support as of 2.0.1. We’ve re-added max-width: 100%; to images by default. We removed it in our last release since we had folks complaining about Google Maps integration and other projects, but we’re taking a different stance now on these things and will require developers to make these tweaks on their end.
  • Added variable @navbarBrandColor for the brand element in navbars, which defaults to @navbarLinkColor.
  • Font-family mixins now use variables for their stacks.
  • Fixed an unescaped filter on the .reset-filter() mixin that was causing some errors depending on your compiler.
  • Fixed regression in .form-actions background, which was too dark, by adding a new variable @formActionsBackground and changing the color to #f5f5f5 instead of #eee.
  • Fixed an issue on button group dropdowns where the background color was not using the button’s darker color when the dropdown is open.
  • Generalized and simplified the open dropdown classes while adding smarter defaults. Instead of .dropdown.open, we now use just .open. On the defaults side, all dropdown menus now have rounded corners to start.
  • Improved active .dropdown-toggle styles (for dropdown buttons) by darkening the background and sharpening the inset shadow to match the active state of buttons.
  • Direction of animation on progress bars reversed.
  • Fixed input-prepend/append issue with uneditable inputs: .uneditable-input was being floated and a missing comma meant its border-radius for the append option wasn’t being applied properly.
  • Removed height: auto; from img since it was overriding dimensions set via HTML attributes.
  • Fixed an issue of double borders on the top of tables with captions or colgroups.
  • Fixed issue with anchor buttons in the .navbar-text. Instead of a general styling on all anchors within an element with that class, we now have a new class to specifically apply appropriate link color.
  • Added support for @navbarHeight on the brand/project name and nav links for complete navbar height customization.
  • Fixed the black borders on buttons problem in IE7 by removing the border, increasing the line-height, and providing darker background colors.
  • Removed excess padding on .search-query inputs in IE7 since it doesn’t have border-radius.
  • Updated alert messages in Components to use button elements as close icons instead of a. Both can be used, but an a will require href="#" for dismissal on iOS devices.
  • Fixed an issue with prepended/appended inputs in Firefox where select elements required two clicks to toggle the dropdown. Resolved by moving the position: relative to the select by default instead of on :focus.
  • Added a new mixin, .backface-visibility, to help refine CSS 3D tranforms. Examples and explanation of usage can be found on CSS Tricks.
  • Changed specificity of grid classes in responsive layouts under 767px to accurately target input, select, and textarea elements that use .span* classes.
  • Horizontal description lists, .dl-horizontal, now truncate terms that are too long to fit in their fixed-width column. In the < 767px responsive layout, they change to their default stacked layout.
  • Changed tabbable tabs to prevent issues in left and right aligned tabs. .tab-content would not growing to its parent’s full width due to display: table. We removed that and the width: 100% and instead just set overflow: auto to clear the left and right aligned tabs.
  • Updated thumbnails to support fluid grid column sizing.
  • Added > to most of the button group selectors
  • Added new variable, @inputBorderRadius, to all form controls that previously made use of the static 3px value everywhere.
  • Changed the way we do border-radius for tables. Instead of the regular mixin that zeros out all other corners, we specify one corner only so they can be combined for use on single column table headers.
  • Updated Glyphicons Halflings from 1.5 to 1.6, introducing 20 new icons.
  • Added an offset paramater to the .makeColumn.
  • Increased the specificity of all tabbable nav selectors to include .nav-collapse to appropriately scope the responsive navbar behavior.
  • Fixed uneditable inputs: text now cuts off and does not wrap, making it behave just like a default input.
  • Labels and badges are now vertical-align: baseline; so they line up with surrounding text.

JavaScript

  • Add jshint support
  • Add travis-ci support w/ headless phantom integration
  • Replace UA sniffing in bootstrap-transitions.js
  • Add MSTransitionEnd event to transition plugin
  • Fix pause method in carousel (shouldn’t restart when hovering over controls)
  • Fix crazy opera bug #1776
  • Don’t open dropdown if target element is disabled
  • Always select last item in scrollspy if you’ve reached the bottom of the document or element
  • Typeahead should escape regexp special chars
  • If interval is false on carousel, do not auto-cycle
  • Add preventDefault support for all initial event types (show, close, hide, etc.)
  • Fix collapse bug in ie7+ for initial collapse in
  • Fix nested collapse bug
  • If transitioning collapse, don’t start new transition
  • Try to autodetect when to use html/text method in tooltip/popovers to help prevent xss
  • Add bootstrap + bootstrap.min.js to gh-pages for @remy and jsbin support

Documentation and repo

  • Combined badges and labels into a single LESS file, badges-labels.less, to reduce repeated CSS.
  • Separated responsive features into multiple files. We now have a file for each grouping of media queries (tablets and down, tablets to desktops, and large desktops). Additionally, the visible/hidden utility classes and the responsive navbar are in their own files. The output is the same in the compiled CSS, but this should give folks a bit more flexibility.
  • Added a new CSS Tests page in the docs (not in the top nav) for better testing of edge cases and extending the use of standard components.
  • Removed the bootstrap.zip file from the repo and the make process for faster building and a lighter repo. From now on, the zip will only be in the documentation branch.
  • Fixed incorrect use of class instead of ID for tabs example and added documentation for multiple ways of toggling tabs.
  • Fixed required markup listed for the specialized navbar search field.
  • Removed all mention of @siteWidth, a variable no longer in use.
  • Removed mentions of unused @buttonPrimaryBackground variable, which is no longer in use.
  • Updated LESS docs page to include all the new variables we added in previous releases.
  • Removed broken “dropup” menus from tabs and pills examples (shouldn’t have been there in the first place).
  • Replaced .badge-error with .badge-important. The error option is not a valid class and was a typo in the docs.
  • Fixed mention of how to add plain text to the navbar. Previously the docs stated you only needed a p tag, but the required HTML is any element with class .navbar-text.
  • Clarified the use of .tabbable for tabs. The wrapping class is only required for left and right tabs to clear their floats. Also added mention of .fade to fade in tabs.
  • Updated forms documentation:
    • Remove unnecessary duplicate help text in first example
    • Added mention of required input class, .search-query, for the search form variation
    • Removed incorrect mention of form fields being display: block; to start as fields are inline-block to start.
  • Added mention of data-target attribute for the dropdowns JavaScript plugin to show how to keep custom URLs intact on links with .dropdown-toggle class.
  • Updated the Kippt screenshot on the homepage to reflect their recent responsive redesign and upgrade to 2.0.2.

We’re continually updating issues and tracking them for our next release in the 2.1 milestone, which will focus on adding a few new features and tackle the inevitable bugs and edge cases from this release.

Bootstrap, JSHint, and Recess

This last week we’ve added two new developer tools to the Bootstrap tool chain and I wanted to take a minute to let you know a little bit more about what they are, why we’ve added them, and why it matters.

JSHint

JSHint is an awesome community-driven linting tool, used to detect errors and potential problems in your JS, and to enforce coding conventions. It’s super flexible and can easily adapt to whichever coding guidelines and environment you expect your code to execute in.

As of 2.0.3, all JS (including tests) will be run through JSHint as a part of the build process. We’re hoping that this will both catch potentially unsafe syntax as well as encourage a convention around Bootstap’s JavaScript style.

To begin with, Bootstrap’s JS will use the following options (stored in a .jshintrc file in the js dir):

{
    "validthis" : true
  , "laxcomma"  : true
  , "laxbreak"  : true
  , "browser"   : true
  , "boss"      : true
  , "expr"      : true
  , "asi"       : true
}

We hope this will make it a little easier for those looking to contribute to Bootstrap, and lessen the pain around pull requests with divergent styles. If you haven’t played with JSHint, you should definitely take a moment to check it out right now!

Recess

Recess is a project developed at Twitter to help support our internal style guide.

Recess screenshot

At it’s core, Recess is a linter, but with the added ability to compile and/or reformat your css/less files: normalizing whitespace, stripping 0 values, reordering properties, and any other safe stylistic optimizations it can find.

What this means is that instead of just telling you where you have problems, you can actually tell Recess to just go ahead and tidy your code up for you.

To begin with, we’re only using Recess in this manner — as a compiler for our Less (rather than the lessc compiler directly). This gives us strict control over the output of Bootstrap and let’s Mark and I really geekout, which we’re super excited about (we like things to be perfect… we’re nerds like that).

The Future

Eventually we’d like to try to roll these tools (along with our unit tests) into some sort of continuous integration service. At Twitter, we’re already using travis-ci on a number of our other projects (Hogan.js, Recess), so we may follow suit with Bootstrap soon. This will make it even easier for us to accept pull requests from the community, as we’ll be able to see all our tests passing! :)

Anyways — that’s all for now. As always, if you have any questions or feedback, let us know! thanks!

<3

Help test Bootstrap 2.0.3

Our next release, 2.0.3, is almost ready to rock, but we need your help to get the finish line in the best shape possible. Similar to what we did for the big 2.0 launch, we’re asking for the community’s help in testing out the release’s work-in-progress branch. We have a ton of bug fixes—another 80 or so since 2.0.2—and want to have the highest quality release we can.

Why?

Good question. 2.0.2 introduced some bad bugs in component behavior, publicized outdated documentation, and introduced some ugly regressions. That sucks, and when those things happen, we get held up tracking them down because we missed something in our haste to get a release out the door. We want to focus all our efforts on the 2.1 release after 2.0.3, and to do that we need to get as bug free as we can with this one.

We’ll leave 2.0.3-wip open for widespread testing all this week (April 16-20) and then push a release while Jacob and I are in London on April 24. That should give folks, including us, enough time to test the waters and report any back on any issues.

How?

Just like last time, we’re pushing out a release candidate of the 2.0.3 code and docs. Here’s how you can help us out:

  • Head to GitHub and checkout the 2.0.3-wip branch.
  • Don’t want to check out any code? [We’re hosting the latest version of the docs here (http://203rc1.getbootstrap.com) so you can easily load it up on devices and such for testing.
  • Load up the new docs in your favorite, or your least favorite, browser or device and start testing.
  • When you find a bug or have feedback, open a new issue on GitHub. Please include as much context and information as possible. If it’s a visual bug, please include a screenshot. If it pertains to JavaScript, consider including a jsfiddle or jsbin.
  • If it’s a code fix you can make yourself, go ahead and submit a pull request against 2.0.3-wip. Be sure to read the Contributing to Bootstrap wiki page first though for a bit of insight into our code practices. (Unsure how to submit a pull request? Learn more here.)

We’re only human, and we’re bound to make a few mistakes in our code as Bootstrap continues to grow. Thanks in advance for all your help and support—it’s appreciated more than you know.

Bootstrap's first intercontinental release

As you may have heard, Jacob and I are heading to London in a week to talk Bootstrap—and we’re pretty stoked about it! The event is already sold out, but we’ll be there for a few days to be sure to chat and hang with folks in the area.

As part of our visit and talk, we’ll be releasing Bootstrap 2.0.3 on April 24 from London, our first intercontinental release. It’s been a long time coming, and we know lots of you have been anxiously awaiting its arrival, but we want to do this release the best we can. In addition to the release itself, the rest of our talk will focus on the future of Bootstrap. We’re not exactly sure what that will be yet, but the 2.1 milestone on GitHub might give away some of it.

Stay tuned for more info and feel free to hit us up on Twitter for questions, opportunities to meet up, and more.