aboutsummaryrefslogtreecommitdiff
path: root/docs/components.html
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-02-10 23:50:45 -0800
committerMark Otto <[email protected]>2012-02-10 23:50:45 -0800
commitc720d951be4481dab684955b7ef1a4ebb03ed0cf (patch)
tree528b20496a046b0de2d93d0bc9712875ab0699fb /docs/components.html
parent8a91f927f51fc96221dd553baef5dbe73b8b9b4c (diff)
downloadbootstrap-c720d951be4481dab684955b7ef1a4ebb03ed0cf.tar.xz
bootstrap-c720d951be4481dab684955b7ef1a4ebb03ed0cf.zip
add best practices and re-org the button groups
Diffstat (limited to 'docs/components.html')
-rw-r--r--docs/components.html38
1 files changed, 23 insertions, 15 deletions
diff --git a/docs/components.html b/docs/components.html
index 2a31528ea..cb41c736e 100644
--- a/docs/components.html
+++ b/docs/components.html
@@ -118,14 +118,34 @@
<div class="span4">
<h3>Button groups</h3>
<p>Use button groups to join multiple buttons together as one composite component. Build them with a series of <code>&lt;a&gt;</code> or <code>&lt;button&gt;</code> elements.</p>
- <p>You can also combine sets of <code>&lt;div class="btn-group"&gt;</code> into a <code>&lt;div class="btn-toolbar"&gt;</code> for more complex projects.</p>
- <div class="btn-toolbar" style="margin-top: 18px;">
- <div class="btn-group">
+ <h3>Best practices</h3>
+ <p>We recommend the following guidelines for using button groups and toolbars:</p>
+ <ul>
+ <li>Always use the same element in a single button group, <code>&lt;a&gt;</code> or <code>&lt;button&gt;</code>.</li>
+ <li>Don't mix buttons of different colors in the same button group.</li>
+ <li>Use icons in addition to or instead of text, but be sure include alt and title text where appropriate.</li>
+ </ul>
+ <p><span class="label label-info">Related</span> Button groups with dropdowns (see below) should be called out separately and always include a dropdown caret to indicate intended behavior.</p>
+ </div>
+ <div class="span4">
+ <h3>Default example</h3>
+ <p>Here's how the HTML looks for a standard button group built with anchor tag buttons:</p>
+ <div class="">
+ <div class="btn-group" style="margin: 9px 0;">
<a class="btn" href="#">Left</a>
<a class="btn" href="#">Middle</a>
<a class="btn" href="#">Right</a>
</div>
</div>
+<pre class="prettyprint linenums">
+&lt;div class="btn-group"&gt;
+ &lt;a class="btn" href="#"&gt;1&lt;/a&gt;
+ &lt;a class="btn" href="#"&gt;2&lt;/a&gt;
+ &lt;a class="btn" href="#"&gt;3&lt;/a&gt;
+&lt;/div&gt;
+</pre>
+ <h3>Toolbar example</h3>
+ <p>Combine sets of <code>&lt;div class="btn-group"&gt;</code> into a <code>&lt;div class="btn-toolbar"&gt;</code> for more complex components.</p>
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn" href="#">1</a>
@@ -142,18 +162,6 @@
<a class="btn" href="#">8</a>
</div>
</div>
- </div>
- <div class="span4">
- <h3>Example markup</h3>
- <p>Here's how the HTML looks for a standard button group built with anchor tag buttons:</p>
-<pre class="prettyprint linenums">
-&lt;div class="btn-group"&gt;
- &lt;a class="btn" href="#"&gt;1&lt;/a&gt;
- &lt;a class="btn" href="#"&gt;2&lt;/a&gt;
- &lt;a class="btn" href="#"&gt;3&lt;/a&gt;
-&lt;/div&gt;
-</pre>
- <p>And with a toolbar for multiple groups:</p>
<pre class="prettyprint linenums">
&lt;div class="btn-toolbar"&gt;
&lt;div class="btn-group"&gt;