vendor/frameworks/twitter/bootstrap/dropdowns.less in less-rails-bootstrap-2.1.1 vs vendor/frameworks/twitter/bootstrap/dropdowns.less in less-rails-bootstrap-2.2.0

- old
+ new

@@ -70,11 +70,11 @@ .divider { .nav-divider(@dropdownDividerTop, @dropdownDividerBottom); } // Links within the dropdown menu - a { + li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: @baseLineHeight; @@ -88,22 +88,20 @@ .dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-submenu:hover > a { text-decoration: none; color: @dropdownLinkColorHover; - background-color: @dropdownLinkBackgroundHover; #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%)); } // Active state // ------------ .dropdown-menu .active > a, .dropdown-menu .active > a:hover { - color: @dropdownLinkColorHover; + color: @dropdownLinkColorActive; text-decoration: none; outline: 0; - background-color: @dropdownLinkBackgroundActive; #gradient > .vertical(@dropdownLinkBackgroundActive, darken(@dropdownLinkBackgroundActive, 5%)); } // Disabled state // -------------- @@ -114,10 +112,11 @@ } // Nuke hover effects .dropdown-menu .disabled > a:hover { text-decoration: none; background-color: transparent; + background-image: none; // Remove CSS gradient cursor: default; } // Open state for the dropdown // --------------------------- @@ -161,10 +160,11 @@ // Sub menus // --------------------------- .dropdown-submenu { position: relative; } +// Default dropdowns .dropdown-submenu > .dropdown-menu { top: 0; left: 100%; margin-top: -6px; margin-left: -1px; @@ -174,10 +174,22 @@ } .dropdown-submenu:hover > .dropdown-menu { display: block; } +// Dropups +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} + +// Caret to indicate there is a submenu .dropdown-submenu > a:after { display: block; content: " "; float: right; width: 0; @@ -191,11 +203,26 @@ } .dropdown-submenu:hover > a:after { border-left-color: @dropdownLinkColorHover; } +// 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; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; + } +} + // Tweak nav headers // ----------------- // Increase padding from 15px to 20px on sides .dropdown .dropdown-menu .nav-header { padding-left: 20px; @@ -204,7 +231,7 @@ // Typeahead // --------- .typeahead { margin-top: 2px; // give it some space to breathe - .border-radius(4px); + .border-radius(@baseBorderRadius); }