diff options
| author | Mark Otto <[email protected]> | 2013-07-17 20:44:27 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-07-17 20:44:27 -0700 |
| commit | f0d071832284d968f2cb72b0bb576f8112a349de (patch) | |
| tree | 9766c8da2b7c6890cdc794a2d93d4ca81c191047 /less/dropdowns.less | |
| parent | c5fb401a626c3e0d99a764cb7961e1bd3e619e8f (diff) | |
| parent | bfebf0e490c795601220f74b7089adb4f47acda7 (diff) | |
| download | bootstrap-f0d071832284d968f2cb72b0bb576f8112a349de.tar.xz bootstrap-f0d071832284d968f2cb72b0bb576f8112a349de.zip | |
Merge branch '3.0.0-wip' into bs3_remove_examples
Conflicts:
docs/_includes/nav-getting-started.html
docs/examples/navbar-fixed-top.html
docs/examples/navbar-static-top.html
docs/examples/navbar.html
docs/getting-started.html
Diffstat (limited to 'less/dropdowns.less')
| -rw-r--r-- | less/dropdowns.less | 120 |
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; -} |
