]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
add horizontal divider support to nav list, including documentation for it, per ...
authorMark Otto <markotto@twitter.com>
Mon, 20 Feb 2012 20:38:49 +0000 (12:38 -0800)
committerMark Otto <markotto@twitter.com>
Mon, 20 Feb 2012 20:38:49 +0000 (12:38 -0800)
docs/assets/bootstrap.zip
docs/assets/css/bootstrap.css
docs/components.html
docs/templates/pages/components.mustache
less/dropdowns.less
less/mixins.less
less/navs.less

index 146023c5dfa81bb051b183ed5390cf5e6dde4949..58ef3d5ee85725aab39f48e5d9950592d82ade41 100644 (file)
Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ
index 155f5dad13b894d25978509c85c2f7e4dbc809d7..472a3fa31cceeed22913962dd5394a675299966b 100644 (file)
@@ -1612,7 +1612,7 @@ table .span12 {
 }
 .dropdown-menu .divider {
   height: 1px;
-  margin: 5px 1px;
+  margin: 8px 1px;
   overflow: hidden;
   background-color: #e5e5e5;
   border-bottom: 1px solid #ffffff;
@@ -2217,6 +2217,15 @@ button.btn.small, input[type="submit"].btn.small {
 .nav-list [class^="icon-"] {
   margin-right: 2px;
 }
+.nav-list .divider {
+  height: 1px;
+  margin: 8px 1px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+  *width: 100%;
+  *margin: -5px 0 5px;
+}
 .nav-tabs, .nav-pills {
   *zoom: 1;
 }
index 895d62f756b7da0b7afeed836c7d3e2e4b9f271d..046bd7280406434bdec594685298db6c81371fe2 100644 (file)
       <h3>Application-style navigation</h3>
       <p>Nav lists provide a simple and easy way to build groups of nav links with optional headers. They're best used in sidebars like the Finder in OS X.</p>
       <p>Structurally, they're built on the same core nav styles as tabs and pills, so usage and customization are straightforward.</p>
+      <hr>
       <h4>With icons</h4>
       <p>Nav lists are also easy to equip with icons. Add the proper <code>&lt;i&gt;</code> tag with class and you're set.</p>
+      <h4>Horizontal dividers</h4>
+      <p>Add a horizontal divider by creating an empty list item with the class <code>.divider</code>, like so:</p>
+<pre class="prettyprint linenums">
+&lt;ul class="nav nav-list"&gt;
+  ...
+  &lt;li class="divider"&gt;&lt;/li&gt;
+  ...
+&lt;/ul&gt;
+</pre>
     </div>
     <div class="span4">
       <h3>Example nav list</h3>
           <li class="nav-header">Another list header</li>
           <li><a href="#">Profile</a></li>
           <li><a href="#">Settings</a></li>
+          <li class="divider"></li>
           <li><a href="#">Help</a></li>
         </ul>
       </div> <!-- /well -->
           <li class="nav-header">Another list header</li>
           <li><a href="#"><i class="icon-user"></i> Profile</a></li>
           <li><a href="#"><i class="icon-cog"></i> Settings</a></li>
+          <li class="divider"></li>
           <li><a href="#"><i class="icon-flag"></i> Help</a></li>
         </ul>
       </div> <!-- /well -->
index dcf5212a8969ef0739890381e69197bbc37a5b2d..a8aaeeff5f1b52af2c6c5e8624e1e16177b7af89 100644 (file)
       <h3>{{_i}}Application-style navigation{{/i}}</h3>
       <p>{{_i}}Nav lists provide a simple and easy way to build groups of nav links with optional headers. They're best used in sidebars like the Finder in OS X.{{/i}}</p>
       <p>{{_i}}Structurally, they're built on the same core nav styles as tabs and pills, so usage and customization are straightforward.{{/i}}</p>
+      <hr>
       <h4>{{_i}}With icons{{/i}}</h4>
       <p>{{_i}}Nav lists are also easy to equip with icons. Add the proper <code>&lt;i&gt;</code> tag with class and you're set.{{/i}}</p>
+      <h4>{{_i}}Horizontal dividers{{/i}}</h4>
+      <p>{{_i}}Add a horizontal divider by creating an empty list item with the class <code>.divider</code>, like so:{{/i}}</p>
+<pre class="prettyprint linenums">
+&lt;ul class="nav nav-list"&gt;
+  ...
+  &lt;li class="divider"&gt;&lt;/li&gt;
+  ...
+&lt;/ul&gt;
+</pre>
     </div>
     <div class="span4">
       <h3>{{_i}}Example nav list{{/i}}</h3>
           <li class="nav-header">{{_i}}Another list header{{/i}}</li>
           <li><a href="#">{{_i}}Profile{{/i}}</a></li>
           <li><a href="#">{{_i}}Settings{{/i}}</a></li>
+          <li class="divider"></li>
           <li><a href="#">{{_i}}Help{{/i}}</a></li>
         </ul>
       </div> <!-- /well -->
           <li class="nav-header">{{_i}}Another list header{{/i}}</li>
           <li><a href="#"><i class="icon-user"></i> {{_i}}Profile{{/i}}</a></li>
           <li><a href="#"><i class="icon-cog"></i> {{_i}}Settings{{/i}}</a></li>
+          <li class="divider"></li>
           <li><a href="#"><i class="icon-flag"></i> {{_i}}Help{{/i}}</a></li>
         </ul>
       </div> <!-- /well -->
index 88a7462c4668a79912a875881e2c837365870d3b..fa46e288b1c7c6537458e8d0c295c98ae65e9309 100644 (file)
 
   // Dividers (basically an hr) within the dropdown
   .divider {
-    height: 1px;
-    margin: 5px 1px;
-    overflow: hidden;
-    background-color: #e5e5e5;
-    border-bottom: 1px solid @white;
-
-    // IE7 needs a set width since we gave a height. Restricting just
-    // to IE7 to keep the 1px left/right space in other browsers.
-    // It is unclear where IE is getting the extra space that we need
-    // to negative-margin away, but so it goes.
-    *width: 100%;
-    *margin: -5px 0 5px;
+    .nav-divider();
   }
 
   // Links within the dropdown menu
index 0d9436e2fc905ecca3052dd86ba965a509d3464a..e05667fff25a1905c3653644488aaa30ced40c3c 100644 (file)
 }
 
 
-// Mixin for generating button backgrounds
-// ---------------------------------------
+
+// COMPONENT MIXINS
+// --------------------------------------------------
+
+// NAV DIVIDER
+// -------------------------
+// Dividers (basically an hr) within dropdowns and nav lists
+.nav-divider() {
+  height: 1px;
+  margin: ((@baseLineHeight / 2) - 1) 1px; // 8px 1px
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid @white;
+
+  // IE7 needs a set width since we gave a height. Restricting just
+  // to IE7 to keep the 1px left/right space in other browsers.
+  // It is unclear where IE is getting the extra space that we need
+  // to negative-margin away, but so it goes.
+  *width: 100%;
+  *margin: -5px 0 5px;
+}
+
+// BUTTON BACKGROUNDS
+// ------------------
 .buttonBackground(@startColor, @endColor) {
   // gradientBar will set the background to a pleasing blend of these, to support IE<=9
   .gradientBar(@startColor, @endColor);
   }
 }
 
-
-// COMPONENT MIXINS
-// --------------------------------------------------
-
 // POPOVER ARROWS
 // -------------------------
 // For tipsies and popovers
index 06219fa62d598a9602e9e1bfb34a30276ad45b89..1325bb15a3bb759c83f946729a6e4c35644834ba 100644 (file)
 .nav-list [class^="icon-"] {
   margin-right: 2px;
 }
+// Dividers (basically an hr) within the dropdown
+.nav-list .divider {
+  .nav-divider();
+}