aboutsummaryrefslogtreecommitdiff
path: root/less/dropdowns.less
diff options
context:
space:
mode:
Diffstat (limited to 'less/dropdowns.less')
-rw-r--r--less/dropdowns.less120
1 files changed, 31 insertions, 89 deletions
diff --git a/less/dropdowns.less b/less/dropdowns.less
index 3e0152788..8ae9dbba1 100644
--- a/less/dropdowns.less
+++ b/less/dropdowns.less
@@ -62,42 +62,48 @@
// Hover/Focus state
// -----------
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus,
-.dropdown-submenu:hover > a,
-.dropdown-submenu:focus > a {
- text-decoration: none;
- color: @dropdown-link-hover-color;
- #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
+.dropdown-menu > li > a {
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ color: @dropdown-link-hover-color;
+ #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
+ }
}
// Active state
// ------------
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
- color: @dropdown-link-active-color;
- text-decoration: none;
- outline: 0;
- #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
+.dropdown-menu > .active > a {
+ &,
+ &:hover,
+ &:focus {
+ color: @dropdown-link-active-color;
+ text-decoration: none;
+ outline: 0;
+ #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
+ }
}
// Disabled state
// --------------
// Gray out text and ensure the hover/focus state remains gray
-.dropdown-menu > .disabled > a,
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- color: @gray-light;
+.dropdown-menu > .disabled > a {
+ &,
+ &:hover,
+ &:focus {
+ color: @gray-light;
+ }
}
// 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
- .reset-filter();
- cursor: default;
+.dropdown-menu > .disabled > a {
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ background-color: transparent;
+ background-image: none; // Remove CSS gradient
+ .reset-filter();
+ cursor: default;
+ }
}
// Open state for the dropdown
@@ -153,64 +159,6 @@
}
}
-// Sub menus
-// ---------------------------
-.dropdown-submenu {
- position: relative;
-}
-// Default dropdowns
-.dropdown-submenu > .dropdown-menu {
- top: 0;
- left: 100%;
- margin-top: -6px;
- margin-left: -1px;
- border-top-left-radius: 0; // Nuke the closest corner as appropriate
-}
-.dropdown-submenu:hover > .dropdown-menu {
- display: block;
-}
-
-// Dropups
-.dropup .dropdown-submenu > .dropdown-menu {
- top: auto;
- bottom: 0;
- margin-top: 0;
- margin-bottom: -2px;
- border-bottom-left-radius: 0; // Nuke the closest corner as appropriate
-}
-
-// Caret to indicate there is a submenu
-.dropdown-submenu > a:after {
- display: block;
- content: " ";
- float: right;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
- border-width: 5px 0 5px 5px;
- border-left-color: darken(@dropdown-bg, 20%);
- margin-top: 5px;
- margin-right: -10px;
-}
-.dropdown-submenu:hover > a:after {
- border-left-color: @dropdown-link-hover-color;
-}
-
-// Left aligned submenus
-.dropdown-submenu.pull-left {
- // Undo the float
- // Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere.
- float: none;
-
- // Positioning the submenu
- > .dropdown-menu {
- left: -100%;
- margin-left: 10px;
- border-top-right-radius: 0; // Remove the rounded corner here
- }
-}
-
// Tweak nav headers
// ---------------------------
// Increase padding from 15px to 20px on sides
@@ -218,9 +166,3 @@
padding-left: 20px;
padding-right: 20px;
}
-
-// Typeahead
-// ---------------------------
-.typeahead {
- z-index: 1051;
-}