aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes
diff options
context:
space:
mode:
authorPatrick H. Lauke <[email protected]>2014-11-15 00:26:22 +0000
committerPatrick H. Lauke <[email protected]>2014-11-15 00:26:22 +0000
commitcb8581580c86ba7e2805dc63ac7edd4548c9801c (patch)
tree9d050bc41f165251773be46692af5450649c7f62 /docs/_includes
parent25ef6ad625d02ef8832edabeee1319ffde4537cf (diff)
downloadbootstrap-cb8581580c86ba7e2805dc63ac7edd4548c9801c.tar.xz
bootstrap-cb8581580c86ba7e2805dc63ac7edd4548c9801c.zip
Move button-tags section to start of button section
Diffstat (limited to 'docs/_includes')
-rw-r--r--docs/_includes/css/buttons.html61
-rw-r--r--docs/_includes/nav/css.html2
2 files changed, 32 insertions, 31 deletions
diff --git a/docs/_includes/css/buttons.html b/docs/_includes/css/buttons.html
index 2fad8b0d4..c4aee5972 100644
--- a/docs/_includes/css/buttons.html
+++ b/docs/_includes/css/buttons.html
@@ -1,6 +1,37 @@
<div class="bs-docs-section">
<h1 id="buttons" class="page-header">Buttons</h1>
+ <h2 id="buttons-tags">Button tags</h2>
+ <p>Use the button classes on an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, or <code>&lt;input&gt;</code> element.</p>
+ <form class="bs-example">
+ <a class="btn btn-default" href="#" role="button">Link</a>
+ <button class="btn btn-default" type="submit">Button</button>
+ <input class="btn btn-default" type="button" value="Input">
+ <input class="btn btn-default" type="submit" value="Submit">
+ </form>
+{% highlight html %}
+<a class="btn btn-default" href="#" role="button">Link</a>
+<button class="btn btn-default" type="submit">Button</button>
+<input class="btn btn-default" type="button" value="Input">
+<input class="btn btn-default" type="submit" value="Submit">
+{% endhighlight %}
+
+ <div class="bs-callout bs-callout-warning" id="callout-buttons-context-usage">
+ <h4>Context-specific usage</h4>
+ <p>While button classes can be used on <code>&lt;a&gt;</code> and <code>&lt;button&gt;</code> elements, only <code>&lt;button&gt;</code> elements are supported within our nav and navbar components.</p>
+ </div>
+
+ <div class="bs-callout bs-callout-warning" id="callout-buttons-anchor-accessibility">
+ <h4>Links acting as buttons</h4>
+ <p>If the <code>&lt;a&gt;</code> elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate <code>role="button"</code>.</p>
+ </div>
+
+ <div class="bs-callout bs-callout-warning" id="callout-buttons-ff-height">
+ <h4>Cross-browser rendering</h4>
+ <p>As a best practice, <strong>we highly recommend using the <code>&lt;button&gt;</code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
+ <p>Among other things, there's <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=697451">a bug in Firefox &lt;30</a> that prevents us from setting the <code>line-height</code> of <code>&lt;input&gt;</code>-based buttons, causing them to not exactly match the height of other buttons on Firefox.</p>
+ </div>
+
<h2 id="buttons-options">Options</h2>
<p>Use any of the available button classes to quickly create a styled button.</p>
<div class="bs-example">
@@ -155,34 +186,4 @@
<p>This class uses <code>pointer-events: none</code> to try to disable the link functionality of <code>&lt;a&gt;</code>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. In addition, even in browsers that do support <code>pointer-events: none</code>, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, use custom JavaScript to disable such links.</p>
</div>
- <h2 id="buttons-tags">Button tags</h2>
- <p>Use the button classes on an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, or <code>&lt;input&gt;</code> element.</p>
- <form class="bs-example">
- <a class="btn btn-default" href="#" role="button">Link</a>
- <button class="btn btn-default" type="submit">Button</button>
- <input class="btn btn-default" type="button" value="Input">
- <input class="btn btn-default" type="submit" value="Submit">
- </form>
-{% highlight html %}
-<a class="btn btn-default" href="#" role="button">Link</a>
-<button class="btn btn-default" type="submit">Button</button>
-<input class="btn btn-default" type="button" value="Input">
-<input class="btn btn-default" type="submit" value="Submit">
-{% endhighlight %}
-
- <div class="bs-callout bs-callout-warning" id="callout-buttons-context-usage">
- <h4>Context-specific usage</h4>
- <p>While button classes can be used on <code>&lt;a&gt;</code> and <code>&lt;button&gt;</code> elements, only <code>&lt;button&gt;</code> elements are supported within our nav and navbar components.</p>
- </div>
-
- <div class="bs-callout bs-callout-warning" id="callout-buttons-anchor-accessibility">
- <h4>Links acting as buttons</h4>
- <p>If the <code>&lt;a&gt;</code> elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate <code>role="button"</code>.</p>
- </div>
-
- <div class="bs-callout bs-callout-warning" id="callout-buttons-ff-height">
- <h4>Cross-browser rendering</h4>
- <p>As a best practice, <strong>we highly recommend using the <code>&lt;button&gt;</code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
- <p>Among other things, there's <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=697451">a bug in Firefox &lt;30</a> that prevents us from setting the <code>line-height</code> of <code>&lt;input&gt;</code>-based buttons, causing them to not exactly match the height of other buttons on Firefox.</p>
- </div>
</div>
diff --git a/docs/_includes/nav/css.html b/docs/_includes/nav/css.html
index fad72a615..02becfe68 100644
--- a/docs/_includes/nav/css.html
+++ b/docs/_includes/nav/css.html
@@ -81,11 +81,11 @@
<li>
<a href="#buttons">Buttons</a>
<ul class="nav">
+ <li><a href="#buttons-tags">Button tags</a></li>
<li><a href="#buttons-options">Options</a></li>
<li><a href="#buttons-sizes">Sizes</a></li>
<li><a href="#buttons-active">Active state</a></li>
<li><a href="#buttons-disabled">Disabled state</a></li>
- <li><a href="#buttons-tags">Button tags</a></li>
</ul>
</li>
<li>