In August 2013, Version 3 of the Bootstrap framework was released.
The first version, developed by Mark Otto and Jacob Thornton at Twitter in 2011, was a pure CSS library. It was designed to provide a solid foundation for the most common user interface tasks that front-end developers faced every day, including grids and page layouts, typography, navigation, input and forms. It hid the chronic problems of layout incompatibilities between different browser versions, and offered a consistent styling and customization mechanism with the LESS CSS dynamic stylesheet language. Clearly, it fulfilled that need very successfully: by 2012 it had become the most watched and forked project on GitHub.
But 2011/2012 was also the year that SmartPhones and Tablets exploded onto the consumer scene. In the UK alone, 34.3% of the population had SmartPhones in 2011, and by 2012 this figure had grown to 41.7%. In the US, there were over 28 million iPad users in 2011, growing to over 53 million in 2012. (Data from New Media Trend Watch.)
Web developers quickly learned that the experience of browsing on these mobile devices with their smaller screens, limited bandwidth and touch (or pen) interfaces was very poor.
The first response was to try to develop “mobile” versions of existing sites. These chopped out functionality, using much simpler page layout and smaller (or no) images to help reduce the bandwidth demands, and fewer complex user interactions or animations that mobile browsers couldn’t support, or don’t work so well when you’re prodding a screen with a finger or stylus. This was so-called graceful degradation. It was usually implemented by detecting that you were running on a mobile browser, and redirecting the user to a special mobile-only site.
The Bootstrap developers were aware of the need to support responsive design techniques, and in 2012 they released Version 2 of the framework. This included some (optional) files that used the newly enhanced CSS3
@media queries (which were widely supported by both desktop and mobile browsers) to allow the grid and other layout elements to adapt to different screen sizes. You could choose whether to use a fixed grid (where the grid columns are fixed pixel size), a breakpoint approach (where the grid switches size at particular thresholds corresponding to common screen-widths) or a fluid approach (where the grid adapts seamlessly as the display size changes on a particular device, or as a browser window is resized).
By 2013, it became apparent that it would probably be less than a year before a majority of page views on the web would be from mobile devices (or, at least, non-desktop devices, including tablet, mobile and smart TVs). The argument for a mobile first design philosophy becomes much stronger if the majority of your visitors might be coming in on a mobile device!
With that in mind, the Bootstrap team took a strategic decision to bake responsive design into the core of the framework for their version 3 release, and to encourage a mobile-first approach.
Their key goals were:
- To simplify the CSS to make it smaller, and quicker to render on low-powered devices. This included changing their default styles to remove gradients and shadows (which are still not well supported across all browsers, and expensive to render), focusing on a clean, flat colour scheme.
- To make the basic layout engine responsive by default
- To make all graphical elements (including the standard icon set) scalable by the use of Web Fonts
- To give more control over the layout in mobile form-factors. In Version 2, mobile layouts would always stack vertically. In version 3, you can be more flexible.
In this series, we’re going to look at some techniques for mobile-first design. We’ll consider the needs of the mobile user versus a desktop or tablet user, along with the impossible challenge of being all things to all people. We’ll see how to use Bootstrap Version 3 to progressively enhance their experience and minimize the impact on power consumption, bandwidth, SEO and accessibility, without adversely impacting the cost of developing and maintaining the code.
We’re also going to look at how to work with and overcome the constraints of the Bootstrap framework, and learn how to produce semantic HTML, customized to your particular requirements.
We’ll get started by looking at some basic tools of responsive design (including the Boostrap 3 grid system), and then think about what mobile-first means for the creative process.