aboutsummaryrefslogtreecommitdiff
path: root/less/dropdowns.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-07-27 10:06:54 -0700
committerMark Otto <[email protected]>2012-07-27 10:06:54 -0700
commit9d5c4312232ebb53b2499ed495851c0d61eb648c (patch)
treeee602408a1cd0bb79afd0cfd59cca7f0ede8df0b /less/dropdowns.less
parent1e9b4506196bd448c4038151964733ca524c10bb (diff)
downloadbootstrap-9d5c4312232ebb53b2499ed495851c0d61eb648c.tar.xz
bootstrap-9d5c4312232ebb53b2499ed495851c0d61eb648c.zip
add basic support for sub menus in dropdown menus
Diffstat (limited to 'less/dropdowns.less')
-rw-r--r--less/dropdowns.less38
1 files changed, 29 insertions, 9 deletions
diff --git a/less/dropdowns.less b/less/dropdowns.less
index 5f62d27f0..a36c3a416 100644
--- a/less/dropdowns.less
+++ b/less/dropdowns.less
@@ -96,7 +96,8 @@
// Hover state
// -----------
.dropdown-menu li > a:hover,
-.dropdown-menu li > a:focus {
+.dropdown-menu li > a:focus,
+.dropdown-submenu:hover > a {
text-decoration: none;
color: @dropdownLinkColorHover;
background-color: @dropdownLinkBackgroundHover;
@@ -128,14 +129,6 @@
cursor: default;
}
-// Tweak nav headers
-// -----------------
-// Increase padding from 15px to 20px on sides
-.dropdown .dropdown-menu .nav-header {
- padding-left: 20px;
- padding-right: 20px;
-}
-
// Open state for the dropdown
// ---------------------------
.open {
@@ -175,6 +168,33 @@
}
}
+// Sub menus
+// ---------------------------
+.dropdown-submenu {
+ position: relative;
+}
+.dropdown-submenu > .dropdown-menu {
+ top: 0;
+ left: 100%;
+ margin-top: -5px;
+ margin-left: -1px;
+ -webkit-border-radius: 0 6px 6px 6px;
+ -moz-border-radius: 0 6px 6px 6px;
+ border-radius: 0 6px 6px 6px;
+}
+.dropdown-submenu:hover .dropdown-menu {
+ display: block;
+}
+
+
+// Tweak nav headers
+// -----------------
+// Increase padding from 15px to 20px on sides
+.dropdown .dropdown-menu .nav-header {
+ padding-left: 20px;
+ padding-right: 20px;
+}
+
// Typeahead
// ---------
.typeahead {