Scaffolding

Boo grids, layouts, and components. Built on Twitter Bootstrap

Requires HTML5 doctype

Boo makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.

<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html>
<!--<![endif]-->

<head> ... </head>

Support for HTML5 and CSS3

html5shiv allows you to use HTML5 sectioning elements in legacy Internet Explorer, as well as default HTML5 styling in Internet Explorer 6 - 9, Safari 4.x (and iPhone 3.x), and Firefox 3.x.

Selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8.

<head>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <script src="assets/plugins/selectivizr/selectivizr-min.js"></script>
    <script src="assets/plugins/flot/excanvas.min.js"></script>
<![endif]-->
</head>

Live fluid grid example

The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.

1
1
1
1
1
1
1
1
1
1
1
1
4
4
4
4
8
6
6
12

Basic fluid grid HTML

Make any row "fluid" by changing .row to .row-fluid. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.

<div class="row-fluid">
  <div class="span4">...</div>
  <div class="span8">...</div>
</div>

Fluid offsetting

Operates the same way as the fixed grid system offsetting: add .offset* to any column to offset by that many columns.

4
4 offset 4
3 offset 3
3 offset 3
6 offset 6
<div class="row-fluid">
  <div class="span4">...</div>
  <div class="span4 offset2">...</div>
</div>

Fluid nesting

Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.

Fluid 12
Fluid 6
Fluid 6
<div class="row-fluid">
  <div class="span12">
    Fluid 12
    <div class="row-fluid">
      <div class="span6">Fluid 6</div>
      <div class="span6">Fluid 6</div>
    </div>
  </div>
</div>
<div class="page-container">
    <div id="header-container">
        <div id="header">
            <div class="navbar navbar-inverse navbar-fixed-top"> ... </div>
            <div class="header-drawer"> ... </div>
        </div>
    </div>
    <!-- // header-container -->
    <div id="main-container">
        <div id="main-sidebar" class="sidebar sidebar-inverse"> ... </div>
        <!-- // sidebar -->
        <div id="main-content" class="main-content container-fluid"> ... </div>
        <!-- // main-content --> 
    </div>
    <!-- // main-container  -->
    <footer id="footer-fix"> ... </footer>
</div>
<!-- // page-container  --> 
              
<div id="main-container">
    <div id="main-sidebar" class="sidebar sidebar-inverse"> ... </div>
    <!-- // sidebar -->
    <div id="main-content" class="main-content container-fluid"> ... </div>
    <!-- // main-content --> 
</div>
<!-- // main-container  -->

Setting the sidebar to the right or left side (integrated jquery):

    <body class="sidebar-left panel-side"> ... </body>
              

Setting the sidebar bacground color (integrated jquery):

    <div id="main-sidebar" class="sidebar"> ... </div>
    or
    <div id="main-sidebar" class="sidebar sidebar-inverse"> ... </div>    
              

Bloc code for the sidebar:

<div id="main-sidebar" class="sidebar sidebar-inverse">
    <div class="sidebar-item"> ... </div>
    <!-- // sidebar item - profile -->
    <ul id="mainSideMenu" class="nav nav-list nav-side">
        <li class="accordion-group">
            <div class="accordion-heading active"></div>
            <ul class="accordion-content nav nav-list collapse in" id="accDash">
                <li class="active"> <a href="dashboard-one.html"> </li>
            </ul>
        </li>
        <!-- // item accordionMenu Dashboard -->
        <li class="accordion-group"> 
            ... 
        </li>
        <!-- // item accordionMenu Dashboard -->
    </ul>
    <!-- // sidebar menu -->
    <div class="sidebar-item"></div>
    <!-- // sidebar item --> 
</div>
<!-- // sidebar -->
              

Enabling responsive features

Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <head> of your document. If you've compiled Boo from the Customize page, you need only include the meta tag.

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">

Supported devices

Boo supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:

Label Layout width Column width Gutter width
Large display 1200px and up 70px 30px
Default 980px and up 60px 20px
Portrait tablets 768px and above 42px 20px
Phones to tablets 767px and below Fluid columns, no fixed widths
Phones 480px and below Fluid columns, no fixed widths
.grider 979px and below Use in combination with span* if you want to display as a block element
.grider-item 1200px and below Use in combination with span* if you want to display as a block element
/* Large desktop */
@media (min-width: 1200px) { ... }

/* Portrait tablet to landscape and desktop */
@media (min-width: 768px) and (max-width: 979px) { ... }

/* Landscape phone to portrait tablet */
@media (max-width: 767px) { ... }

/* Landscape phones and down */
@media (max-width: 480px) { ... }

/* Griter - element as block */
@media (max-width: 979px) { ... }

/* Griter-item - element as block */
@media (max-width: 1200px) { ... }

Responsive utility classes

For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in responsive.less.

Class Phones 767px and below Tablets 979px to 768px Desktops Default
.visible-phone Visible
.visible-tablet Visible
.visible-desktop Visible
.hidden-phone Visible Visible
.hidden-tablet Visible Visible
.hidden-desktop Visible Visible

When to use

Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. Responsive utilities should not be used with tables, and as such are not supported.

Responsive utilities test case

Resize your browser or load on different devices to test the above classes.

Visible on...

Green checkmarks indicate that class is visible in your current viewport.

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop

Hidden on...

Here, green checkmarks indicate that class is hidden in your current viewport.

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop