0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

Merge branch '2.3.0-wip' of github.com:twitter/bootstrap into 2.3.0-wip

This commit is contained in:
fat 2013-02-05 20:01:25 -08:00
commit c25e8182ba
20 changed files with 230 additions and 112 deletions

View File

@ -1003,7 +1003,9 @@
margin-bottom: 2px;
}
.nav-collapse .nav > li > a:hover,
.nav-collapse .dropdown-menu a:hover {
.nav-collapse .nav > li > a:focus,
.nav-collapse .dropdown-menu a:hover,
.nav-collapse .dropdown-menu a:focus {
background-color: #f2f2f2;
}
.navbar-inverse .nav-collapse .nav > li > a,
@ -1011,7 +1013,9 @@
color: #999999;
}
.navbar-inverse .nav-collapse .nav > li > a:hover,
.navbar-inverse .nav-collapse .dropdown-menu a:hover {
.navbar-inverse .nav-collapse .nav > li > a:focus,
.navbar-inverse .nav-collapse .dropdown-menu a:hover,
.navbar-inverse .nav-collapse .dropdown-menu a:focus {
background-color: #111111;
}
.nav-collapse.in .btn-group {

View File

@ -235,7 +235,8 @@ a {
text-decoration: none;
}
a:hover {
a:hover,
a:focus {
color: #005580;
text-decoration: underline;
}
@ -678,7 +679,8 @@ cite {
color: #999999;
}
a.muted:hover {
a.muted:hover,
a.muted:focus {
color: #808080;
}
@ -686,7 +688,8 @@ a.muted:hover {
color: #c09853;
}
a.text-warning:hover {
a.text-warning:hover,
a.text-warning:focus {
color: #a47e3c;
}
@ -694,7 +697,8 @@ a.text-warning:hover {
color: #b94a48;
}
a.text-error:hover {
a.text-error:hover,
a.text-error:focus {
color: #953b39;
}
@ -702,7 +706,8 @@ a.text-error:hover {
color: #3a87ad;
}
a.text-info:hover {
a.text-info:hover,
a.text-info:focus {
color: #2d6987;
}
@ -710,7 +715,8 @@ a.text-info:hover {
color: #468847;
}
a.text-success:hover {
a.text-success:hover,
a.text-success:focus {
color: #356635;
}
@ -2281,7 +2287,7 @@ table th[class*="span"],
background-repeat: no-repeat;
}
/* White icons with optional class, or on hover/active states of certain elements */
/* White icons with optional class, or on hover/focus/active states of certain elements */
.icon-white,
.nav-pills > .active > a > [class^="icon-"],
@ -2291,11 +2297,15 @@ table th[class*="span"],
.navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"],
.dropdown-menu > li > a:focus > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"],
.dropdown-menu > li > a:focus > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"],
.dropdown-submenu:hover > a > [class^="icon-"],
.dropdown-submenu:hover > a > [class*=" icon-"] {
.dropdown-submenu:focus > a > [class^="icon-"],
.dropdown-submenu:hover > a > [class*=" icon-"],
.dropdown-submenu:focus > a > [class*=" icon-"] {
background-image: url("../img/glyphicons-halflings-white.png");
}
@ -2946,7 +2956,8 @@ table th[class*="span"],
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a {
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a {
color: #ffffff;
text-decoration: none;
background-color: #0081c2;
@ -2960,7 +2971,8 @@ table th[class*="span"],
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover {
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: #ffffff;
text-decoration: none;
background-color: #0081c2;
@ -2975,11 +2987,13 @@ table th[class*="span"],
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover {
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #999999;
}
.dropdown-menu > .disabled > a:hover {
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
text-decoration: none;
cursor: default;
background-color: transparent;
@ -3155,7 +3169,8 @@ table th[class*="span"],
filter: alpha(opacity=20);
}
.close:hover {
.close:hover,
.close:focus {
color: #000000;
text-decoration: none;
cursor: pointer;
@ -3209,6 +3224,7 @@ button.close {
}
.btn:hover,
.btn:focus,
.btn:active,
.btn.active,
.btn.disabled,
@ -3227,7 +3243,8 @@ button.close {
*margin-left: 0;
}
.btn:hover {
.btn:hover,
.btn:focus {
color: #333333;
text-decoration: none;
background-position: 0 -15px;
@ -3349,6 +3366,7 @@ input[type="button"].btn-block {
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.disabled,
@ -3381,6 +3399,7 @@ input[type="button"].btn-block {
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.btn-warning.disabled,
@ -3413,6 +3432,7 @@ input[type="button"].btn-block {
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.btn-danger.disabled,
@ -3445,6 +3465,7 @@ input[type="button"].btn-block {
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.btn-success.disabled,
@ -3477,6 +3498,7 @@ input[type="button"].btn-block {
}
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active,
.btn-info.disabled,
@ -3509,6 +3531,7 @@ input[type="button"].btn-block {
}
.btn-inverse:hover,
.btn-inverse:focus,
.btn-inverse:active,
.btn-inverse.active,
.btn-inverse.disabled,
@ -3572,13 +3595,15 @@ input[type="submit"].btn.btn-mini {
border-radius: 0;
}
.btn-link:hover {
.btn-link:hover,
.btn-link:focus {
color: #005580;
text-decoration: underline;
background-color: transparent;
}
.btn-link[disabled]:hover {
.btn-link[disabled]:hover,
.btn-link[disabled]:focus {
color: #333333;
text-decoration: none;
}
@ -3922,7 +3947,8 @@ input[type="submit"].btn.btn-mini {
display: block;
}
.nav > li > a:hover {
.nav > li > a:hover,
.nav > li > a:focus {
text-decoration: none;
background-color: #eeeeee;
}
@ -3968,7 +3994,8 @@ input[type="submit"].btn.btn-mini {
}
.nav-list > .active > a,
.nav-list > .active > a:hover {
.nav-list > .active > a:hover,
.nav-list > .active > a:focus {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
background-color: #0088cc;
@ -4039,12 +4066,14 @@ input[type="submit"].btn.btn-mini {
border-radius: 4px 4px 0 0;
}
.nav-tabs > li > a:hover {
.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
border-color: #eeeeee #eeeeee #dddddd;
}
.nav-tabs > .active > a,
.nav-tabs > .active > a:hover {
.nav-tabs > .active > a:hover,
.nav-tabs > .active > a:focus {
color: #555555;
cursor: default;
background-color: #ffffff;
@ -4063,7 +4092,8 @@ input[type="submit"].btn.btn-mini {
}
.nav-pills > .active > a,
.nav-pills > .active > a:hover {
.nav-pills > .active > a:hover,
.nav-pills > .active > a:focus {
color: #ffffff;
background-color: #0088cc;
}
@ -4105,7 +4135,8 @@ input[type="submit"].btn.btn-mini {
-moz-border-radius-bottomleft: 4px;
}
.nav-tabs.nav-stacked > li > a:hover {
.nav-tabs.nav-stacked > li > a:hover,
.nav-tabs.nav-stacked > li > a:focus {
z-index: 2;
border-color: #ddd;
}
@ -4136,7 +4167,8 @@ input[type="submit"].btn.btn-mini {
border-bottom-color: #0088cc;
}
.nav .dropdown-toggle:hover .caret {
.nav .dropdown-toggle:hover .caret,
.nav .dropdown-toggle:focus .caret {
border-top-color: #005580;
border-bottom-color: #005580;
}
@ -4157,13 +4189,15 @@ input[type="submit"].btn.btn-mini {
border-bottom-color: #555555;
}
.nav > .dropdown.active > a:hover {
.nav > .dropdown.active > a:hover,
.nav > .dropdown.active > a:focus {
cursor: pointer;
}
.nav-tabs .open .dropdown-toggle,
.nav-pills .open .dropdown-toggle,
.nav > li.dropdown.open.active > a:hover {
.nav > li.dropdown.open.active > a:hover,
.nav > li.dropdown.open.active > a:focus {
color: #ffffff;
background-color: #999999;
border-color: #999999;
@ -4171,14 +4205,16 @@ input[type="submit"].btn.btn-mini {
.nav li.dropdown.open .caret,
.nav li.dropdown.open.active .caret,
.nav li.dropdown.open a:hover .caret {
.nav li.dropdown.open a:hover .caret,
.nav li.dropdown.open a:focus .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
opacity: 1;
filter: alpha(opacity=100);
}
.tabs-stacked .open > a:hover {
.tabs-stacked .open > a:hover,
.tabs-stacked .open > a:focus {
border-color: #999999;
}
@ -4232,13 +4268,15 @@ input[type="submit"].btn.btn-mini {
border-radius: 0 0 4px 4px;
}
.tabs-below > .nav-tabs > li > a:hover {
.tabs-below > .nav-tabs > li > a:hover,
.tabs-below > .nav-tabs > li > a:focus {
border-top-color: #ddd;
border-bottom-color: transparent;
}
.tabs-below > .nav-tabs > .active > a,
.tabs-below > .nav-tabs > .active > a:hover {
.tabs-below > .nav-tabs > .active > a:hover,
.tabs-below > .nav-tabs > .active > a:focus {
border-color: transparent #ddd #ddd #ddd;
}
@ -4267,12 +4305,14 @@ input[type="submit"].btn.btn-mini {
border-radius: 4px 0 0 4px;
}
.tabs-left > .nav-tabs > li > a:hover {
.tabs-left > .nav-tabs > li > a:hover,
.tabs-left > .nav-tabs > li > a:focus {
border-color: #eeeeee #dddddd #eeeeee #eeeeee;
}
.tabs-left > .nav-tabs .active > a,
.tabs-left > .nav-tabs .active > a:hover {
.tabs-left > .nav-tabs .active > a:hover,
.tabs-left > .nav-tabs .active > a:focus {
border-color: #ddd transparent #ddd #ddd;
*border-right-color: #ffffff;
}
@ -4290,12 +4330,14 @@ input[type="submit"].btn.btn-mini {
border-radius: 0 4px 4px 0;
}
.tabs-right > .nav-tabs > li > a:hover {
.tabs-right > .nav-tabs > li > a:hover,
.tabs-right > .nav-tabs > li > a:focus {
border-color: #eeeeee #eeeeee #eeeeee #dddddd;
}
.tabs-right > .nav-tabs .active > a,
.tabs-right > .nav-tabs .active > a:hover {
.tabs-right > .nav-tabs .active > a:hover,
.tabs-right > .nav-tabs .active > a:focus {
border-color: #ddd #ddd #ddd transparent;
*border-left-color: #ffffff;
}
@ -4304,7 +4346,8 @@ input[type="submit"].btn.btn-mini {
color: #999999;
}
.nav > .disabled > a:hover {
.nav > .disabled > a:hover,
.nav > .disabled > a:focus {
text-decoration: none;
cursor: default;
background-color: transparent;
@ -4370,7 +4413,8 @@ input[type="submit"].btn.btn-mini {
text-shadow: 0 1px 0 #ffffff;
}
.navbar .brand:hover {
.navbar .brand:hover,
.navbar .brand:focus {
text-decoration: none;
}
@ -4384,7 +4428,8 @@ input[type="submit"].btn.btn-mini {
color: #777777;
}
.navbar-link:hover {
.navbar-link:hover,
.navbar-link:focus {
color: #333333;
}
@ -4612,6 +4657,7 @@ input[type="submit"].btn.btn-mini {
}
.navbar .btn-navbar:hover,
.navbar .btn-navbar:focus,
.navbar .btn-navbar:active,
.navbar .btn-navbar.active,
.navbar .btn-navbar.disabled,
@ -4681,7 +4727,8 @@ input[type="submit"].btn.btn-mini {
border-bottom: 0;
}
.navbar .nav li.dropdown > a:hover .caret {
.navbar .nav li.dropdown > a:hover .caret,
.navbar .nav li.dropdown > a:focus .caret {
border-top-color: #333333;
border-bottom-color: #333333;
}
@ -4753,7 +4800,9 @@ input[type="submit"].btn.btn-mini {
}
.navbar-inverse .brand:hover,
.navbar-inverse .nav > li > a:hover {
.navbar-inverse .nav > li > a:hover,
.navbar-inverse .brand:focus,
.navbar-inverse .nav > li > a:focus {
color: #ffffff;
}
@ -4782,7 +4831,8 @@ input[type="submit"].btn.btn-mini {
color: #999999;
}
.navbar-inverse .navbar-link:hover {
.navbar-inverse .navbar-link:hover,
.navbar-inverse .navbar-link:focus {
color: #ffffff;
}
@ -4798,7 +4848,8 @@ input[type="submit"].btn.btn-mini {
background-color: #111111;
}
.navbar-inverse .nav li.dropdown > a:hover .caret {
.navbar-inverse .nav li.dropdown > a:hover .caret,
.navbar-inverse .nav li.dropdown > a:focus .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
}
@ -4871,6 +4922,7 @@ input[type="submit"].btn.btn-mini {
}
.navbar-inverse .btn-navbar:hover,
.navbar-inverse .btn-navbar:focus,
.navbar-inverse .btn-navbar:active,
.navbar-inverse .btn-navbar.active,
.navbar-inverse .btn-navbar.disabled,
@ -4945,6 +4997,7 @@ input[type="submit"].btn.btn-mini {
}
.pagination ul > li > a:hover,
.pagination ul > li > a:focus,
.pagination ul > .active > a,
.pagination ul > .active > span {
background-color: #f5f5f5;
@ -4958,7 +5011,8 @@ input[type="submit"].btn.btn-mini {
.pagination ul > .disabled > span,
.pagination ul > .disabled > a,
.pagination ul > .disabled > a:hover {
.pagination ul > .disabled > a:hover,
.pagination ul > .disabled > a:focus {
color: #999999;
cursor: default;
background-color: transparent;
@ -5088,7 +5142,8 @@ input[type="submit"].btn.btn-mini {
border-radius: 15px;
}
.pager li > a:hover {
.pager li > a:hover,
.pager li > a:focus {
text-decoration: none;
background-color: #f5f5f5;
}
@ -5105,6 +5160,7 @@ input[type="submit"].btn.btn-mini {
.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
color: #999999;
cursor: default;
@ -5503,7 +5559,8 @@ input[type="submit"].btn.btn-mini {
transition: all 0.2s ease-in-out;
}
a.thumbnail:hover {
a.thumbnail:hover,
a.thumbnail:focus {
border-color: #0088cc;
-webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
-moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
@ -5593,7 +5650,9 @@ a.thumbnail:hover {
}
a.label:hover,
a.badge:hover {
a.label:focus,
a.badge:hover,
a.badge:focus {
color: #ffffff;
text-decoration: none;
cursor: pointer;
@ -5989,7 +6048,8 @@ a.badge:hover {
left: auto;
}
.carousel-control:hover {
.carousel-control:hover,
.carousel-control:focus {
color: #ffffff;
text-decoration: none;
opacity: 0.9;

View File

@ -95,7 +95,7 @@
<div class="hero-unit">
<h1>Hello, world!</h1>
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a class="btn btn-primary btn-large">Learn more &raquo;</a></p>
<p><a href="#" class="btn btn-primary btn-large">Learn more &raquo;</a></p>
</div>
<div class="row-fluid">
<div class="span4">

View File

@ -75,7 +75,7 @@
<div class="hero-unit">
<h1>Hello, world!</h1>
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a class="btn btn-primary btn-large">Learn more &raquo;</a></p>
<p><a href="#" class="btn btn-primary btn-large">Learn more &raquo;</a></p>
</div>
<!-- Example row of columns -->

View File

@ -212,7 +212,7 @@
, getPosition: function () {
var el = this.$element[0]
return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : {
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
width: el.offsetWidth
, height: el.offsetHeight
}, this.$element.offset())

View File

@ -25,13 +25,14 @@
.ie7-restore-left-whitespace(); // Give IE7 some love
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
// Hover state
&:hover {
// Hover/focus state
&:hover,
&:focus {
color: @grayDark;
text-decoration: none;
background-position: 0 -15px;
// transition is only when going to hover, otherwise the background
// transition is only when going to hover/focus, otherwise the background
// behind the gradient (there for IE<=9 fallback) gets mismatched
.transition(background-position .1s linear);
}
@ -214,12 +215,14 @@ input[type="submit"].btn {
color: @linkColor;
.border-radius(0);
}
.btn-link:hover {
.btn-link:hover,
.btn-link:focus {
color: @linkColorHover;
text-decoration: underline;
background-color: transparent;
}
.btn-link[disabled]:hover {
.btn-link[disabled]:hover,
.btn-link[disabled]:focus {
color: @grayDark;
text-decoration: none;
}

View File

@ -98,8 +98,9 @@
right: 15px;
}
// Hover state
&:hover {
// Hover/focus state
&:hover,
&:focus {
color: @white;
text-decoration: none;
.opacity(90);

View File

@ -11,7 +11,8 @@
color: @black;
text-shadow: 0 1px 0 rgba(255,255,255,1);
.opacity(20);
&:hover {
&:hover,
&:focus {
color: @black;
text-decoration: none;
cursor: pointer;

View File

@ -83,11 +83,12 @@
}
}
// Hover state
// Hover/Focus state
// -----------
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a {
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a {
text-decoration: none;
color: @dropdownLinkColorHover;
#gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
@ -96,7 +97,8 @@
// Active state
// ------------
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover {
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: @dropdownLinkColorActive;
text-decoration: none;
outline: 0;
@ -105,13 +107,15 @@
// Disabled state
// --------------
// Gray out text and ensure the hover state remains gray
// Gray out text and ensure the hover/focus state remains gray
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover {
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: @grayLight;
}
// Nuke hover effects
.dropdown-menu > .disabled > a:hover {
// Nuke hover/focus effects
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
text-decoration: none;
background-color: transparent;
background-image: none; // Remove CSS gradient

View File

@ -35,10 +35,12 @@
}
}
// Hover state, but only for links
// Hover/focus state, but only for links
a {
&.label:hover,
&.badge:hover {
&.label:focus,
&.badge:hover,
&.badge:focus {
color: @white;
text-decoration: none;
cursor: pointer;

View File

@ -517,7 +517,7 @@
.reset-filter();
// in these cases the gradient won't cover the background, so we override
&:hover, &:active, &.active, &.disabled, &[disabled] {
&:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
color: @textColor;
background-color: @endColor;
*background-color: darken(@endColor, 5%);

View File

@ -56,7 +56,8 @@
font-weight: 200;
color: @navbarBrandColor;
text-shadow: 0 1px 0 @navbarBackgroundHighlight;
&:hover {
&:hover,
&:focus {
text-decoration: none;
}
}
@ -73,7 +74,8 @@
// -------------------------
.navbar-link {
color: @navbarLinkColor;
&:hover {
&:hover,
&:focus {
color: @navbarLinkColorHover;
}
}
@ -249,10 +251,10 @@
margin-top: 8px;
}
// Hover
// Hover/focus
.navbar .nav > li > a:focus,
.navbar .nav > li > a:hover {
background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover/:focus from .active
color: @navbarLinkColorHover;
text-decoration: none;
}
@ -336,8 +338,9 @@
}
}
// Caret should match text color on hover
.navbar .nav li.dropdown > a:hover .caret {
// Caret should match text color on hover/focus
.navbar .nav li.dropdown > a:hover .caret,
.navbar .nav li.dropdown > a:focus .caret {
border-top-color: @navbarLinkColorHover;
border-bottom-color: @navbarLinkColorHover;
}
@ -397,7 +400,8 @@
.nav > li > a {
color: @navbarInverseLinkColor;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
&:hover {
&:hover,
&:focus {
color: @navbarInverseLinkColorHover;
}
}
@ -426,7 +430,8 @@
// Inline text links
.navbar-link {
color: @navbarInverseLinkColor;
&:hover {
&:hover,
&:focus {
color: @navbarInverseLinkColorHover;
}
}
@ -444,7 +449,8 @@
background-color: @navbarInverseLinkBackgroundActive;
color: @navbarInverseLinkColorActive;
}
.nav li.dropdown > a:hover .caret {
.nav li.dropdown > a:hover .caret,
.nav li.dropdown > a:focus .caret {
border-top-color: @navbarInverseLinkColorActive;
border-bottom-color: @navbarInverseLinkColorActive;
}

View File

@ -16,7 +16,8 @@
.nav > li > a {
display: block;
}
.nav > li > a:hover {
.nav > li > a:hover,
.nav > li > a:focus {
text-decoration: none;
background-color: @grayLighter;
}
@ -68,7 +69,8 @@
padding: 3px 15px;
}
.nav-list > .active > a,
.nav-list > .active > a:hover {
.nav-list > .active > a:hover,
.nav-list > .active > a:focus {
color: @white;
text-shadow: 0 -1px 0 rgba(0,0,0,.2);
background-color: @linkColor;
@ -122,13 +124,15 @@
line-height: @baseLineHeight;
border: 1px solid transparent;
.border-radius(4px 4px 0 0);
&:hover {
&:hover,
&:focus {
border-color: @grayLighter @grayLighter #ddd;
}
}
// Active state, and it's :hover to override normal :hover
// Active state, and it's :hover/:focus to override normal :hover/:focus
.nav-tabs > .active > a,
.nav-tabs > .active > a:hover {
.nav-tabs > .active > a:hover,
.nav-tabs > .active > a:focus {
color: @gray;
background-color: @bodyBackground;
border: 1px solid #ddd;
@ -151,7 +155,8 @@
// Active state
.nav-pills > .active > a,
.nav-pills > .active > a:hover {
.nav-pills > .active > a:hover,
.nav-pills > .active > a:focus {
color: @white;
background-color: @linkColor;
}
@ -183,7 +188,8 @@
.nav-tabs.nav-stacked > li:last-child > a {
.border-bottom-radius(4px);
}
.nav-tabs.nav-stacked > li > a:hover {
.nav-tabs.nav-stacked > li > a:hover,
.nav-tabs.nav-stacked > li > a:focus {
border-color: #ddd;
z-index: 2;
}
@ -216,7 +222,8 @@
border-bottom-color: @linkColor;
margin-top: 6px;
}
.nav .dropdown-toggle:hover .caret {
.nav .dropdown-toggle:hover .caret,
.nav .dropdown-toggle:focus .caret {
border-top-color: @linkColorHover;
border-bottom-color: @linkColorHover;
}
@ -236,9 +243,10 @@
border-bottom-color: @gray;
}
// Active:hover dropdown links
// Active:hover/:focus dropdown links
// -------------------------
.nav > .dropdown.active > a:hover {
.nav > .dropdown.active > a:hover,
.nav > .dropdown.active > a:focus {
cursor: pointer;
}
@ -246,21 +254,24 @@
// -------------------------
.nav-tabs .open .dropdown-toggle,
.nav-pills .open .dropdown-toggle,
.nav > li.dropdown.open.active > a:hover {
.nav > li.dropdown.open.active > a:hover,
.nav > li.dropdown.open.active > a:focus {
color: @white;
background-color: @grayLight;
border-color: @grayLight;
}
.nav li.dropdown.open .caret,
.nav li.dropdown.open.active .caret,
.nav li.dropdown.open a:hover .caret {
.nav li.dropdown.open a:hover .caret,
.nav li.dropdown.open a:focus .caret {
border-top-color: @white;
border-bottom-color: @white;
.opacity(100);
}
// Dropdowns in stacked tabs
.tabs-stacked .open > a:hover {
.tabs-stacked .open > a:hover,
.tabs-stacked .open > a:focus {
border-color: @grayLight;
}
@ -311,13 +322,15 @@
}
.tabs-below > .nav-tabs > li > a {
.border-radius(0 0 4px 4px);
&:hover {
&:hover,
&:focus {
border-bottom-color: transparent;
border-top-color: #ddd;
}
}
.tabs-below > .nav-tabs > .active > a,
.tabs-below > .nav-tabs > .active > a:hover {
.tabs-below > .nav-tabs > .active > a:hover,
.tabs-below > .nav-tabs > .active > a:focus {
border-color: transparent #ddd #ddd #ddd;
}
@ -346,11 +359,13 @@
margin-right: -1px;
.border-radius(4px 0 0 4px);
}
.tabs-left > .nav-tabs > li > a:hover {
.tabs-left > .nav-tabs > li > a:hover,
.tabs-left > .nav-tabs > li > a:focus {
border-color: @grayLighter #ddd @grayLighter @grayLighter;
}
.tabs-left > .nav-tabs .active > a,
.tabs-left > .nav-tabs .active > a:hover {
.tabs-left > .nav-tabs .active > a:hover,
.tabs-left > .nav-tabs .active > a:focus {
border-color: #ddd transparent #ddd #ddd;
*border-right-color: @white;
}
@ -365,11 +380,13 @@
margin-left: -1px;
.border-radius(0 4px 4px 0);
}
.tabs-right > .nav-tabs > li > a:hover {
.tabs-right > .nav-tabs > li > a:hover,
.tabs-right > .nav-tabs > li > a:focus {
border-color: @grayLighter @grayLighter @grayLighter #ddd;
}
.tabs-right > .nav-tabs .active > a,
.tabs-right > .nav-tabs .active > a:hover {
.tabs-right > .nav-tabs .active > a:hover,
.tabs-right > .nav-tabs .active > a:focus {
border-color: #ddd #ddd #ddd transparent;
*border-left-color: @white;
}
@ -383,8 +400,9 @@
.nav > .disabled > a {
color: @grayLight;
}
// Nuke hover effects
.nav > .disabled > a:hover {
// Nuke hover/focus effects
.nav > .disabled > a:hover,
.nav > .disabled > a:focus {
text-decoration: none;
background-color: transparent;
cursor: default;

View File

@ -20,7 +20,8 @@
border: 1px solid #ddd;
.border-radius(15px);
}
.pager li > a:hover {
.pager li > a:hover,
.pager li > a:focus {
text-decoration: none;
background-color: #f5f5f5;
}
@ -34,6 +35,7 @@
}
.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
color: @grayLight;
background-color: #fff;

View File

@ -32,6 +32,7 @@
border-left-width: 0;
}
.pagination ul > li > a:hover,
.pagination ul > li > a:focus,
.pagination ul > .active > a,
.pagination ul > .active > span {
background-color: @paginationActiveBackground;
@ -43,7 +44,8 @@
}
.pagination ul > .disabled > span,
.pagination ul > .disabled > a,
.pagination ul > .disabled > a:hover {
.pagination ul > .disabled > a:hover,
.pagination ul > .disabled > a:focus {
color: @grayLight;
background-color: transparent;
cursor: default;

View File

@ -81,7 +81,9 @@
margin-bottom: 2px;
}
.nav-collapse .nav > li > a:hover,
.nav-collapse .dropdown-menu a:hover {
.nav-collapse .nav > li > a:focus,
.nav-collapse .dropdown-menu a:hover,
.nav-collapse .dropdown-menu a:focus {
background-color: @navbarBackground;
}
.navbar-inverse .nav-collapse .nav > li > a,
@ -89,7 +91,9 @@
color: @navbarInverseLinkColor;
}
.navbar-inverse .nav-collapse .nav > li > a:hover,
.navbar-inverse .nav-collapse .dropdown-menu a:hover {
.navbar-inverse .nav-collapse .nav > li > a:focus,
.navbar-inverse .nav-collapse .dropdown-menu a:hover,
.navbar-inverse .nav-collapse .dropdown-menu a:focus {
background-color: @navbarInverseBackground;
}
// Buttons in the navbar

View File

@ -23,7 +23,8 @@ a {
color: @linkColor;
text-decoration: none;
}
a:hover {
a:hover,
a:focus {
color: @linkColorHover;
text-decoration: underline;
}

View File

@ -28,7 +28,7 @@
margin-top: 1px;
}
/* White icons with optional class, or on hover/active states of certain elements */
/* White icons with optional class, or on hover/focus/active states of certain elements */
.icon-white,
.nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"],
@ -37,11 +37,15 @@
.navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"],
.dropdown-menu > li > a:focus > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"],
.dropdown-menu > li > a:focus > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"],
.dropdown-submenu:hover > a > [class^="icon-"],
.dropdown-submenu:hover > a > [class*=" icon-"] {
.dropdown-submenu:focus > a > [class^="icon-"],
.dropdown-submenu:hover > a > [class*=" icon-"],
.dropdown-submenu:focus > a > [class*=" icon-"] {
background-image: url("@{iconWhiteSpritePath}");
}

View File

@ -33,8 +33,9 @@
.box-shadow(0 1px 3px rgba(0,0,0,.055));
.transition(all .2s ease-in-out);
}
// Add a hover state for linked versions only
a.thumbnail:hover {
// Add a hover/focus state for linked versions only
a.thumbnail:hover,
a.thumbnail:focus {
border-color: @linkColor;
.box-shadow(0 1px 4px rgba(0,105,214,.25));
}

View File

@ -29,19 +29,24 @@ cite { font-style: normal; }
// Utility classes
.muted { color: @grayLight; }
a.muted:hover { color: darken(@grayLight, 10%); }
a.muted:hover,
a.muted:focus { color: darken(@grayLight, 10%); }
.text-warning { color: @warningText; }
a.text-warning:hover { color: darken(@warningText, 10%); }
a.text-warning:hover,
a.text-warning:focus { color: darken(@warningText, 10%); }
.text-error { color: @errorText; }
a.text-error:hover { color: darken(@errorText, 10%); }
a.text-error:hover,
a.text-error:focus { color: darken(@errorText, 10%); }
.text-info { color: @infoText; }
a.text-info:hover { color: darken(@infoText, 10%); }
a.text-info:hover,
a.text-info:focus { color: darken(@infoText, 10%); }
.text-success { color: @successText; }
a.text-success:hover { color: darken(@successText, 10%); }
a.text-success:hover,
a.text-success:focus { color: darken(@successText, 10%); }
.text-left { text-align: left; }
.text-right { text-align: right; }