From cb8581580c86ba7e2805dc63ac7edd4548c9801c Mon Sep 17 00:00:00 2001 From: "Patrick H. Lauke" Date: Sat, 15 Nov 2014 00:26:22 +0000 Subject: [PATCH] Move button-tags section to start of button section --- docs/_includes/css/buttons.html | 61 +++++++++++++++++---------------- docs/_includes/nav/css.html | 2 +- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/docs/_includes/css/buttons.html b/docs/_includes/css/buttons.html index 2fad8b0d41..c4aee59722 100644 --- a/docs/_includes/css/buttons.html +++ b/docs/_includes/css/buttons.html @@ -1,6 +1,37 @@

Buttons

+

Button tags

+

Use the button classes on an <a>, <button>, or <input> element.

+
+ Link + + + +
+{% highlight html %} +Link + + + +{% endhighlight %} + +
+

Context-specific usage

+

While button classes can be used on <a> and <button> elements, only <button> elements are supported within our nav and navbar components.

+
+ +
+

Links acting as buttons

+

If the <a> 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 role="button".

+
+ +
+

Cross-browser rendering

+

As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.

+

Among other things, there's a bug in Firefox <30 that prevents us from setting the line-height of <input>-based buttons, causing them to not exactly match the height of other buttons on Firefox.

+
+

Options

Use any of the available button classes to quickly create a styled button.

@@ -155,34 +186,4 @@

This class uses pointer-events: none to try to disable the link functionality of <a>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 pointer-events: none, 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.

-

Button tags

-

Use the button classes on an <a>, <button>, or <input> element.

-
- Link - - - -
-{% highlight html %} -Link - - - -{% endhighlight %} - -
-

Context-specific usage

-

While button classes can be used on <a> and <button> elements, only <button> elements are supported within our nav and navbar components.

-
- -
-

Links acting as buttons

-

If the <a> 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 role="button".

-
- -
-

Cross-browser rendering

-

As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.

-

Among other things, there's a bug in Firefox <30 that prevents us from setting the line-height of <input>-based buttons, causing them to not exactly match the height of other buttons on Firefox.

-
diff --git a/docs/_includes/nav/css.html b/docs/_includes/nav/css.html index fad72a6154..02becfe680 100644 --- a/docs/_includes/nav/css.html +++ b/docs/_includes/nav/css.html @@ -81,11 +81,11 @@
  • Buttons