]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
adding responsive utility classes and matching docs section with super neato table...
authorMark Otto <markotto@twitter.com>
Tue, 21 Feb 2012 16:24:18 +0000 (08:24 -0800)
committerMark Otto <markotto@twitter.com>
Tue, 21 Feb 2012 16:24:18 +0000 (08:24 -0800)
docs/assets/bootstrap.zip
docs/assets/css/bootstrap-responsive.css
docs/assets/css/docs.css
docs/scaffolding.html
docs/templates/pages/scaffolding.mustache
less/responsive.less
less/scaffolding.less

index 9764009092e7361cfca4910636ed5634c068c2f4..e51e7530627ab125d121e978d41030fb116086fc 100644 (file)
Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ
index 9dd71c62d55f61e0a82563b310a59db8a6bf529c..90f63b62266be6988d43579810e9d28444ae6ea6 100644 (file)
   display: none;
   visibility: hidden;
 }
+.visible-phone {
+  display: none;
+}
+.visible-tablet {
+  display: none;
+}
+.visible-desktop {
+  display: block;
+}
+.hidden-phone {
+  display: block;
+}
+.hidden-tablet {
+  display: block;
+}
+.hidden-desktop {
+  display: none;
+}
+@media (max-width: 767px) {
+  .visible-phone {
+    display: block;
+  }
+  .hidden-phone {
+    display: none;
+  }
+  .hidden-desktop {
+    display: block;
+  }
+  .visible-desktop {
+    display: none;
+  }
+}
+@media (min-width: 768px) and (max-width: 979px) {
+  .visible-tablet {
+    display: block;
+  }
+  .hidden-tablet {
+    display: none;
+  }
+  .hidden-desktop {
+    display: block;
+  }
+  .visible-desktop {
+    display: none;
+  }
+}
 @media (max-width: 480px) {
   .nav-collapse {
     -webkit-transform: translate3d(0, 0, 0);
index f5d63f90dcd7658bf5894827da924a7f680f2ead..36da6853ce6ab47e9213efca42181dd91f77b0d7 100644 (file)
@@ -557,6 +557,70 @@ form.well {
   background-color: #fff;
 }
 
+/* Responsive table
+------------------------- */
+.responsive-utilities th small {
+  display: block;
+  font-weight: normal;
+  color: #999;
+}
+.responsive-utilities tbody th {
+  font-weight: normal;
+}
+.responsive-utilities td {
+  text-align: center;
+}
+.responsive-utilities td.is-visible {
+  color: #468847;
+  background-color: #dff0d8 !important;
+}
+.responsive-utilities td.is-hidden {
+  color: #ccc;
+  background-color: #f9f9f9 !important;
+}
+
+/* Responsive tests
+------------------------- */
+.responsive-utilities-test {
+  margin-top: 5px;
+  margin-left: 0;
+  list-style: none;
+  overflow: hidden; /* clear floats */
+}
+.responsive-utilities-test li {
+  position: relative;
+  float: left;
+  width: 25%;
+  height: 43px;
+  font-size: 14px;
+  font-weight: bold;
+  line-height: 43px;
+  color: #999;
+  text-align: center;
+  border: 1px solid #ddd;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+.responsive-utilities-test li + li {
+  margin-left: 10px;
+}
+.responsive-utilities-test span {
+  position: absolute;
+  top:    -1px;
+  left:   -1px;
+  right:  -1px;
+  bottom: -1px;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+.responsive-utilities-test span {
+  color: #468847;
+  background-color: #dff0d8;
+  border: 1px solid #d6e9c6;
+}
+
 
 /* Responsive Docs
 -------------------------------------------------- */
index 97d2bf4c5d2c657f4cf335871196f146507fc724..a35012e9c8b08f5cc170d6faaa5baeb93e10ed2f 100644 (file)
     <div class="span4">
       <p>The default grid system provided as part of Bootstrap is a <strong>940px-wide, 12-column grid</strong>.</p>
       <p>It also has four responsive variations for various devices and resolutions: phone, tablet portrait, table landscape and small desktops, and large widescreen desktops.</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
 <pre class="prettyprint linenums">
 &lt;div class="row"&gt;
   &lt;div class="span8"&gt;...&lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <p>As shown here, a basic layout can be created with two "columns," each spanning a number of the 12 foundational columns we defined as part of our grid system.</p>
-    </div>
-  </div><!-- /row -->
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
   <br>
 
           </div>
         </div>
       </div>
-    </div><!-- /span6 -->
+    </div><!-- /.span -->
     <div class="span6">
 <pre class="prettyprint linenums">
 &lt;div class="row"&gt;
   &lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div>
-  </div>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 </section>
 
 
     <div class="span4">
       <h3>Percents, not pixels</h3>
       <p>The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <h3>Fluid rows</h3>
       <p>Make any row fluid simply by changing <code>.row</code> to <code>.row-fluid</code>. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <h3>Markup</h3>
 <pre class="prettyprint linenums">
   &lt;div class="span8"&gt;...&lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div>
-  </div><!-- /row -->
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
   <h2>Fluid nesting</h2>
   <div class="row">
           </div>
         </div>
       </div>
-    </div>
+    </div><!-- /.span -->
     <div class="span6">
 <pre class="prettyprint linenums">
 &lt;div class="row-fluid"&gt;
   &lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div>
-  </div>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
 </section>
 
     <div class="span4">
       <h3>Variables in LESS</h3>
       <p>Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <h3>How to customize</h3>
       <p>Modifying the grid means changing the three <code>@grid*</code> variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the <a href="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in grid.less.</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <h3>Staying responsive</h3>
       <p>Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to customize the grids in responsive.less.</p>
-    </div>
-  </div><!-- /row -->
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
 </section>
 
   &lt;/div&gt;
 &lt;/body&gt;
 </pre>
-    </div><!-- /col -->
+    </div><!-- /.span -->
     <div class="span6">
       <h2>Fluid layout</h2>
       <p><code>&lt;div class="container-fluid"&gt;</code> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.</p>
   &lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div><!-- /col -->
-  </div><!-- /row -->
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 </section>
 
 
   <!-- Supported devices -->
   <div class="row">
     <div class="span4">
-      <img src="assets/img/responsive-illustrations.png" alt="Responsive devices">
-    </div>
+      <p><img src="assets/img/responsive-illustrations.png" alt="Responsive devices"></p>
+      <h3>What they do</h3>
+      <p>Media queries allow for custom CSS based on a number of conditions&mdash;ratios, widths, display type, etc&mdash;but usually focuses around <code>min-width</code> and <code>max-width</code>.</p>
+      <ul>
+        <li>Modify the width of column in our grid</li>
+        <li>Stack elements instead of float wherever necessary</li>
+        <li>Resize headings and text to be more appropriate for devices</li>
+      </ul>
+      <p>Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.</p>
+    </div><!-- /.span -->
     <div class="span8">
       <h2>Supported devices</h2>
       <p>Bootstrap 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:</p>
       <h3>Requires meta tag</h3>
       <p>To ensure devices display responsive pages properly, include the viewport meta tag.</p>
       <pre class="prettyprint linenums">&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;</pre>
-
-      <h3>What they do</h3>
-      <p>Media queries allow for custom CSS based on a number of conditions&mdash;ratios, widths, display type, etc&mdash;but usually focuses around <code>min-width</code> and <code>max-width</code>.</p>
-      <ul>
-        <li>Modify the width of column in our grid</li>
-        <li>Stack elements instead of float wherever necessary</li>
-        <li>Resize headings and text to be more appropriate for devices</li>
-      </ul>
-    </div>
-  </div>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
   <br>
 
   <!-- Media query code -->
   <h2>Using the media queries</h2>
   <div class="row">
-    <div class="span5">
+    <div class="span4">
       <p>Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:</p>
       <ol>
         <li>Use the compiled responsive version, bootstrap-responsive.css</li>
         <li>Modify and recompile responsive.less as a separate file</li>
       </ol>
       <p><strong>Why not just include it?</strong> Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.</p>
-    </div>
-    <div class="span7">
+    </div><!-- /.span -->
+    <div class="span8">
 <pre class="prettyprint linenums">
   // Landscape phones and down
   @media (max-width: 480px) { ... }
   // Large desktop
   @media (min-width: 1200px) { .. }
 </pre>
-    </div>
-  </div>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
+  <br>
+
+  <!-- Responsive utility classes -->
+  <h2>Responsive utility classes</h2>
+  <div class="row">
+    <div class="span4">
+      <h3>What are they</h2>
+      <p>For faster mobile-friendly development, use these basic utility classes for showing and hidding content by device.</p>
+      <h3>When to use</h2>
+      <p>Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.</p>
+      <p>For example, you might show a <code>&lt;select&gt;</code> element for nav on mobile layouts, but not on tablets or desktops.</p>
+    </div><!-- /.span -->
+    <div class="span8">
+      <h3>Support classes</h3>
+      <p>Shown here is a table of the classes we support and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.</p>
+      <table class="table table-bordered table-striped responsive-utilities">
+        <thead>
+          <tr>
+            <th>Class</th>
+            <th>Phones <small>480px and below</small></th>
+            <th>Tablets <small>767px and below</small></th>
+            <th>Desktops <small>768px and above</small></th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr>
+            <th><code>.visible-phone</code></th>
+            <td class="is-visible">Visible</td>
+            <td class="is-hidden">Hidden</td>
+            <td class="is-hidden">Hidden</td>
+          </tr>
+          <tr>
+            <th><code>.visible-tablet</code></th>
+            <td class="is-hidden">Hidden</td>
+            <td class="is-visible">Visible</td>
+            <td class="is-hidden">Hidden</td>
+          </tr>
+          <tr>
+            <th><code>.visible-desktop</code></th>
+            <td class="is-hidden">Hidden</td>
+            <td class="is-hidden">Hidden</td>
+            <td class="is-visible">Visible</td>
+          </tr>
+          <tr>
+            <th><code>.hidden-phone</code></th>
+            <td class="is-hidden">Hidden</td>
+            <td class="is-visible">Visible</td>
+            <td class="is-visible">Visible</td>
+          </tr>
+          <tr>
+            <th><code>.hidden-tablet</code></th>
+            <td class="is-visible">Visible</td>
+            <td class="is-hidden">Hidden</td>
+            <td class="is-visible">Visible</td>
+          </tr>
+          <tr>
+            <th><code>.hidden-desktop</code></th>
+            <td class="is-visible">Visible</td>
+            <td class="is-visible">Visible</td>
+            <td class="is-hidden">Hidden</td>
+          </tr>
+        </tbody>
+      </table>
+      <h3>Test case</h3>
+      <p>Resize your browser or load on different devices to test the above clases.</p>
+      <h4>Visible on...</h4>
+      <ul class="responsive-utilities-test">
+        <li>Phone<span class="visible-phone">&#10004; Phone</span></li>
+        <li>Tablet<span class="visible-tablet">&#10004; Tablet</span></li>
+        <li>Desktop<span class="visible-desktop">&#10004; Desktop</span></li>
+      </ul>
+      <h4>Hidden on...</h4>
+      <ul class="responsive-utilities-test hidden-on">
+        <li>Phone<span class="hidden-phone">&#10004; Phone</span></li>
+        <li>Tablet<span class="hidden-tablet">&#10004; Tablet</span></li>
+        <li>Desktop<span class="hidden-desktop">&#10004; Desktop</span></li>
+      </ul>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
+
+      
+  <div class="row">
+    <div class="span4">
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 </section>
 
 
index bc4953b24da0daad58445daafce3c51b1b017495..fff47d438380c36670d5784af2c26dff4a5e8b55 100644 (file)
@@ -97,7 +97,7 @@
     <div class="span4">
       <p>{{_i}}The default grid system provided as part of Bootstrap is a <strong>940px-wide, 12-column grid</strong>.{{/i}}</p>
       <p>{{_i}}It also has four responsive variations for various devices and resolutions: phone, tablet portrait, table landscape and small desktops, and large widescreen desktops.{{/i}}</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
 <pre class="prettyprint linenums">
 &lt;div class="row"&gt;
   &lt;div class="span8"&gt;...&lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <p>{{_i}}As shown here, a basic layout can be created with two "columns," each spanning a number of the 12 foundational columns we defined as part of our grid system.{{/i}}</p>
-    </div>
-  </div><!-- /row -->
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
   <br>
 
           </div>
         </div>
       </div>
-    </div><!-- /span6 -->
+    </div><!-- /.span -->
     <div class="span6">
 <pre class="prettyprint linenums">
 &lt;div class="row"&gt;
   &lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div>
-  </div>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 </section>
 
 
     <div class="span4">
       <h3>{{_i}}Percents, not pixels{{/i}}</h3>
       <p>{{_i}}The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.{{/i}}</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <h3>{{_i}}Fluid rows{{/i}}</h3>
       <p>{{_i}}Make any row fluid simply by changing <code>.row</code> to <code>.row-fluid</code>. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.{{/i}}</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <h3>{{_i}}Markup{{/i}}</h3>
 <pre class="prettyprint linenums">
   &lt;div class="span8"&gt;...&lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div>
-  </div><!-- /row -->
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
   <h2>{{_i}}Fluid nesting{{/i}}</h2>
   <div class="row">
           </div>
         </div>
       </div>
-    </div>
+    </div><!-- /.span -->
     <div class="span6">
 <pre class="prettyprint linenums">
 &lt;div class="row-fluid"&gt;
   &lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div>
-  </div>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
 </section>
 
     <div class="span4">
       <h3>{{_i}}Variables in LESS{{/i}}</h3>
       <p>{{_i}}Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.{{/i}}</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <h3>{{_i}}How to customize{{/i}}</h3>
       <p>{{_i}}Modifying the grid means changing the three <code>@grid*</code> variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the <a href="less.html#compiling">four ways documented to recompile</a>. If you're adding more columns, be sure to add the CSS for those in grid.less.{{/i}}</p>
-    </div>
+    </div><!-- /.span -->
     <div class="span4">
       <h3>{{_i}}Staying responsive{{/i}}</h3>
       <p>{{_i}}Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to customize the grids in responsive.less.{{/i}}</p>
-    </div>
-  </div><!-- /row -->
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
 </section>
 
   &lt;/div&gt;
 &lt;/body&gt;
 </pre>
-    </div><!-- /col -->
+    </div><!-- /.span -->
     <div class="span6">
       <h2>{{_i}}Fluid layout{{/i}}</h2>
       <p>{{_i}}<code>&lt;div class="container-fluid"&gt;</code> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.{{/i}}</p>
   &lt;/div&gt;
 &lt;/div&gt;
 </pre>
-    </div><!-- /col -->
-  </div><!-- /row -->
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 </section>
 
 
   <!-- Supported devices -->
   <div class="row">
     <div class="span4">
-      <img src="assets/img/responsive-illustrations.png" alt="Responsive devices">
-    </div>
+      <p><img src="assets/img/responsive-illustrations.png" alt="Responsive devices"></p>
+      <h3>{{_i}}What they do{{/i}}</h3>
+      <p>{{_i}}Media queries allow for custom CSS based on a number of conditions&mdash;ratios, widths, display type, etc&mdash;but usually focuses around <code>min-width</code> and <code>max-width</code>.{{/i}}</p>
+      <ul>
+        <li>{{_i}}Modify the width of column in our grid{{/i}}</li>
+        <li>{{_i}}Stack elements instead of float wherever necessary{{/i}}</li>
+        <li>{{_i}}Resize headings and text to be more appropriate for devices{{/i}}</li>
+      </ul>
+      <p>{{_i}}Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.{{/i}}</p>
+    </div><!-- /.span -->
     <div class="span8">
       <h2>{{_i}}Supported devices{{/i}}</h2>
       <p>{{_i}}Bootstrap 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:{{/i}}</p>
       <h3>{{_i}}Requires meta tag{{/i}}</h3>
       <p>{{_i}}To ensure devices display responsive pages properly, include the viewport meta tag.{{/i}}</p>
       <pre class="prettyprint linenums">&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;</pre>
-
-      <h3>{{_i}}What they do{{/i}}</h3>
-      <p>{{_i}}Media queries allow for custom CSS based on a number of conditions&mdash;ratios, widths, display type, etc&mdash;but usually focuses around <code>min-width</code> and <code>max-width</code>.{{/i}}</p>
-      <ul>
-        <li>{{_i}}Modify the width of column in our grid{{/i}}</li>
-        <li>{{_i}}Stack elements instead of float wherever necessary{{/i}}</li>
-        <li>{{_i}}Resize headings and text to be more appropriate for devices{{/i}}</li>
-      </ul>
-    </div>
-  </div>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 
   <br>
 
   <!-- Media query code -->
   <h2>{{_i}}Using the media queries{{/i}}</h2>
   <div class="row">
-    <div class="span5">
+    <div class="span4">
       <p>{{_i}}Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:{{/i}}</p>
       <ol>
         <li>{{_i}}Use the compiled responsive version, bootstrap-responsive.css{{/i}}</li>
         <li>{{_i}}Modify and recompile responsive.less as a separate file{{/i}}</li>
       </ol>
       <p>{{_i}}<strong>Why not just include it?</strong> Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.{{/i}}</p>
-    </div>
-    <div class="span7">
+    </div><!-- /.span -->
+    <div class="span8">
 <pre class="prettyprint linenums">
   // {{_i}}Landscape phones and down{{/i}}
   @media (max-width: 480px) { ... }
   // {{_i}}Large desktop{{/i}}
   @media (min-width: 1200px) { .. }
 </pre>
-    </div>
-  </div>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
+  <br>
+
+  <!-- Responsive utility classes -->
+  <h2>{{_i}}Responsive utility classes{{/i}}</h2>
+  <div class="row">
+    <div class="span4">
+      <h3>{{_i}}What are they{{/i}}</h2>
+      <p>{{_i}}For faster mobile-friendly development, use these basic utility classes for showing and hidding content by device.{{/i}}</p>
+      <h3>{{_i}}When to use{{/i}}</h2>
+      <p>{{_i}}Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.{{/i}}</p>
+      <p>{{_i}}For example, you might show a <code>&lt;select&gt;</code> element for nav on mobile layouts, but not on tablets or desktops.{{/i}}</p>
+    </div><!-- /.span -->
+    <div class="span8">
+      <h3>{{_i}}Support classes{{/i}}</h3>
+      <p>{{_i}}Shown here is a table of the classes we support and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.{{/i}}</p>
+      <table class="table table-bordered table-striped responsive-utilities">
+        <thead>
+          <tr>
+            <th>{{_i}}Class{{/i}}</th>
+            <th>{{_i}}Phones <small>480px and below</small>{{/i}}</th>
+            <th>{{_i}}Tablets <small>767px and below</small>{{/i}}</th>
+            <th>{{_i}}Desktops <small>768px and above</small>{{/i}}</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr>
+            <th><code>.visible-phone</code></th>
+            <td class="is-visible">{{_i}}Visible{{/i}}</td>
+            <td class="is-hidden">{{_i}}Hidden{{/i}}</td>
+            <td class="is-hidden">{{_i}}Hidden{{/i}}</td>
+          </tr>
+          <tr>
+            <th><code>.visible-tablet</code></th>
+            <td class="is-hidden">{{_i}}Hidden{{/i}}</td>
+            <td class="is-visible">{{_i}}Visible{{/i}}</td>
+            <td class="is-hidden">{{_i}}Hidden{{/i}}</td>
+          </tr>
+          <tr>
+            <th><code>.visible-desktop</code></th>
+            <td class="is-hidden">{{_i}}Hidden{{/i}}</td>
+            <td class="is-hidden">{{_i}}Hidden{{/i}}</td>
+            <td class="is-visible">{{_i}}Visible{{/i}}</td>
+          </tr>
+          <tr>
+            <th><code>.hidden-phone</code></th>
+            <td class="is-hidden">{{_i}}Hidden{{/i}}</td>
+            <td class="is-visible">{{_i}}Visible{{/i}}</td>
+            <td class="is-visible">{{_i}}Visible{{/i}}</td>
+          </tr>
+          <tr>
+            <th><code>.hidden-tablet</code></th>
+            <td class="is-visible">{{_i}}Visible{{/i}}</td>
+            <td class="is-hidden">{{_i}}Hidden{{/i}}</td>
+            <td class="is-visible">{{_i}}Visible{{/i}}</td>
+          </tr>
+          <tr>
+            <th><code>.hidden-desktop</code></th>
+            <td class="is-visible">{{_i}}Visible{{/i}}</td>
+            <td class="is-visible">{{_i}}Visible{{/i}}</td>
+            <td class="is-hidden">{{_i}}Hidden{{/i}}</td>
+          </tr>
+        </tbody>
+      </table>
+      <h3>{{_i}}Test case{{/i}}</h3>
+      <p>{{_i}}Resize your browser or load on different devices to test the above clases.{{/i}}</p>
+      <h4>{{_i}}Visible on...{{/i}}</h4>
+      <ul class="responsive-utilities-test">
+        <li>Phone<span class="visible-phone">&#10004; Phone</span></li>
+        <li>Tablet<span class="visible-tablet">&#10004; Tablet</span></li>
+        <li>Desktop<span class="visible-desktop">&#10004; Desktop</span></li>
+      </ul>
+      <h4>{{_i}}Hidden on...{{/i}}</h4>
+      <ul class="responsive-utilities-test hidden-on">
+        <li>Phone<span class="hidden-phone">&#10004; Phone</span></li>
+        <li>Tablet<span class="hidden-tablet">&#10004; Tablet</span></li>
+        <li>Desktop<span class="hidden-desktop">&#10004; Desktop</span></li>
+      </ul>
+    </div><!-- /.span -->
+  </div><!-- /.row -->
+
+      
+  <div class="row">
+    <div class="span4">
+    </div><!-- /.span -->
+  </div><!-- /.row -->
 </section>
index 8c39f088e7ab3e0980c80a72bdc5bf50b542022e..9cfb592962f406fe96b77bcef53ddcdba543a2ad 100644 (file)
   visibility: hidden;
 }
 
+// Visibility utilities
+
+// For desktops
+.visible-phone     { display: none; }
+.visible-tablet    { display: none; }
+.visible-desktop   { display: block; }
+.hidden-phone      { display: block; }
+.hidden-tablet     { display: block; }
+.hidden-desktop    { display: none; }
+
+// Phones only
+@media (max-width: 767px) {
+  // Show
+  .visible-phone     { display: block; }
+  // Hide
+  .hidden-phone      { display: none; }
+  // Hide everything else
+  .hidden-desktop    { display: block; }
+  .visible-desktop   { display: none; }
+}
+
+// Tablets & small desktops only
+@media (min-width: 768px) and (max-width: 979px) {
+  // Show
+  .visible-tablet    { display: block; }
+  // Hide
+  .hidden-tablet     { display: none; }
+  // Hide everything else
+  .hidden-desktop    { display: block; }
+  .visible-desktop   { display: none; }
+}
 
 
 // UP TO LANDSCAPE PHONE
index 47ce53818b647e549ce73a4b3ce13de84b595a36..c2e683ac67cc8113bbe9018fcc6a0b01477f7ac4 100644 (file)
@@ -3,8 +3,8 @@
 // -------------------------------------------------------------------------------------------
 
 
-// STRUCTURAL LAYOUT
-// -----------------
+// Body reset
+// ----------
 
 body {
   margin: 0;
@@ -16,7 +16,7 @@ body {
 }
 
 
-// LINKS
+// Links
 // -----
 
 a {