From a7b49a7d92a0efa640179b775e309002afc50390 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Thu, 17 May 2012 00:23:11 -0700 Subject: nearly everything working with activedescendant... then decide it's wrong. --- less/dropdowns.less | 15 +++++++++++++-- less/navbar.less | 5 ++++- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'less') diff --git a/less/dropdowns.less b/less/dropdowns.less index 96dfec2237..c27e73dede 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -34,11 +34,16 @@ margin-top: 8px; margin-left: 2px; } -.dropdown:hover .caret, +.dropdown a:focus .caret, +.dropdown a:hover .caret, .open .caret { .opacity(100); } +.navbar .nav .open > a { + color: @navbarLinkColorActive; +} + // The dropdown menu (ul) // ---------------------- .dropdown-menu { @@ -90,11 +95,17 @@ // ----------- .dropdown-menu li > a:hover, .dropdown-menu .active > a, -.dropdown-menu .active > a:hover { +.dropdown-menu .active > a:hover, +.dropdown-menu:hover #aria-active > a:hover, +.dropdown-menu #aria-active > a { color: @dropdownLinkColorHover; text-decoration: none; background-color: @dropdownLinkBackgroundHover; } +.dropdown-menu:hover #aria-active > a { + color: @dropdownLinkColor; + background-color: @dropdownBackground; +} // Open state for the dropdown // --------------------------- diff --git a/less/navbar.less b/less/navbar.less index 4faa7255b4..f6717dcfa5 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -228,6 +228,7 @@ padding: ((@navbarHeight - @elementHeight) / 2 - 1) 5px ((@navbarHeight - @elementHeight) / 2); } // Hover +.navbar .nav > li > a:focus, .navbar .nav > li > a:hover { background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active color: @navbarLinkColorHover; @@ -236,7 +237,8 @@ // Active nav items .navbar .nav .active > a, -.navbar .nav .active > a:hover { +.navbar .nav .active > a:hover, +.navbar .nav .active > a:focus { color: @navbarLinkColorActive; text-decoration: none; background-color: @navbarLinkBackgroundActive; @@ -343,6 +345,7 @@ } // Dropdown link on hover +.navbar .nav li.dropdown.active > .dropdown-toggle:focus, .navbar .nav li.dropdown.active > .dropdown-toggle:hover { color: @white; } -- cgit v1.2.3 From 9889948f5851f5ce19668073b1f88eb4b6082ea6 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Thu, 17 May 2012 00:39:14 -0700 Subject: abandon activedescendant because it was awful --- less/dropdowns.less | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'less') diff --git a/less/dropdowns.less b/less/dropdowns.less index c27e73dede..42d7bd0cab 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -94,17 +94,13 @@ // Hover state // ----------- .dropdown-menu li > a:hover, +.dropdown-menu li > a:focus, .dropdown-menu .active > a, -.dropdown-menu .active > a:hover, -.dropdown-menu:hover #aria-active > a:hover, -.dropdown-menu #aria-active > a { +.dropdown-menu .active > a:hover { color: @dropdownLinkColorHover; text-decoration: none; background-color: @dropdownLinkBackgroundHover; -} -.dropdown-menu:hover #aria-active > a { - color: @dropdownLinkColor; - background-color: @dropdownBackground; + outline: 0; } // Open state for the dropdown -- cgit v1.2.3