Bootstrap 3.0 Mobile-First Refactor: Designing Viewports from Mobile to Desktop

Rebuilding the grid. We examine responsive layouts, media query breakpoints, and custom form styling in Bootstrap 3.

VP
SHIVAM ITCS
·25 March 2013·10 min read·1 views

Reversing the Design Order

In early web design, developers built layout structures for desktop monitors first, then added media queries to hide or wrap columns on mobile viewports. This resulted in redundant CSS and slow rendering performance on mobile browsers.

The upcoming launch of Bootstrap 3.0 completely reverses this layout approach by moving to a mobile-first grid architecture.

UX Paradigm Shift: Design for mobile viewports as the baseline. Add columns and margin space as the screen size expands.

The New Responsive Grid Breakdown

Bootstrap 3 replaces old column classes (like .span4) with fluid, media-query-based classes targeting specific screen breakpoints:

  • Extra Small (.col-xs-): Mobile phones (<768px).
  • Small (.col-sm-): Tablets (≥768px).
  • Medium (.col-md-): Laptops (≥992px).
  • Large (.col-lg-): Large displays (≥1200px).
Breakpoint classMin WidthTarget Devices
.col-xs-*NoneMobile phone screens.
.col-sm-*768pxTablets in portrait mode.
.col-md-*992pxLaptops and desktop screens.

Implementing Mobile-First Layouts

htmlcode
<!-- Fluid grid configuration in Bootstrap 3.0 -->
<div class="row">
    <div class="col-xs-12 col-md-8">
        <h3>Main Panel</h3>
        <p>Full-width on mobile, spans 8 columns on desktop.</p>
    </div>
    <div class="col-xs-12 col-md-4">
        <h3>Sidebar</h3>
        <p>Wraps below main panel on mobile, spans 4 columns on desktop.</p>
    </div>
</div>

Designing mobile-first reduces layout layout reflows and ensures fast, responsive user experiences across all screen types.

VP
Vijay Paliwal
Founder, SHIVAM ITCS · 18+ years enterprise & AI engineering
MCA · Ex-HiveGPT USA · Ex-Social27 Seattle
Bootstrap 3.0 Mobile-First Refactor: Designing Viewports from Mobile to Desktop | SHIVAM ITCS Blog | SHIVAM ITCS