2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

add basic support for sub menus in dropdown menus

This commit is contained in:
Mark Otto
2012-07-27 10:06:54 -07:00
parent 1e9b450619
commit 9d5c431223
4 changed files with 74 additions and 33 deletions
+29 -9
View File
@@ -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 {