From 14b3a3542f15051e1274ff27cf9c0cf453b93243 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 2 Sep 2013 00:09:49 +0200 Subject: [PATCH] fixes #10316: Document .active and :active for buttons --- _includes/nav-css.html | 1 + css.html | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/_includes/nav-css.html b/_includes/nav-css.html index 57aafd4708..ae5962c7c7 100644 --- a/_includes/nav-css.html +++ b/_includes/nav-css.html @@ -67,6 +67,7 @@ diff --git a/css.html b/css.html index 99283f2f92..cc482f95e3 100644 --- a/css.html +++ b/css.html @@ -2112,6 +2112,32 @@ For example, <section> should be wrapped as inline. {% endhighlight %} +

Active state

+

Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <button> elements, this is done via :active. For <a> elements, it's done with .active. However, you may use .active <button>s should you need to replicate the active state progammatically.

+ +

Button element

+

No need to add :active as it's a pseudo state, but if you need it, go ahead and add .active.

+

+ + +

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

Anchor element

+

Add the .active class to <a> buttons.

+

+ Primary link + Link +

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

Disabled state

Make buttons look unclickable by fading them back 50%.