// // Dropdown menus // -------------------------------------------------- @if $dropdowns { // Use the .menu class on any
  • element within the topbar or ul.tabs and you'll get some superfancy dropdowns .dropdown { position: relative; display: inline-block; } .dropdown-toggle { line-height: 1em; } .dropdown-toggle:active, .open .dropdown-toggle { outline: 0; } // Dropdown arrow/caret // -------------------- .caret { display: inline-block; @extend %caret !optional; } // The dropdown menu (ul) // ---------------------- .dropdown-menu { @extend %dropdown !optional; @include border-bottom-radius($base-border-radius); border-style: solid; border-width: $input-border; float: left; left: 0; list-style: none; margin: -$input-border 0 0 0; min-width: em(160px); position: absolute; top: 100%; z-index: $zindex-dropdown; &[data-content] { min-width: em(600px); } // Aligns the dropdown menu to right &.pull-right { right: 0; left: auto; } // Semplice lista di links dentro al dropdown > li > a { @include adjust-font-size-to($base-font-size); display: block; padding: $dropdowns-padding; line-height: 1em; clear: both; font-weight: normal; white-space: nowrap; } > li:last-child > a { @include border-bottom-radius($base-border-radius); border-bottom: 0; } } // Hover/Focus state // –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus, .dropdown-submenu:hover > a, .dropdown-submenu:focus > a { text-decoration: none; } // Active state // –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { text-decoration: none; outline: 0; } // Disabled state // –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: $grayLight; } // 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 // @include reset-filter(); cursor: default; } // Open state for the dropdown // –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– .open { *z-index: $zindex-dropdown ; .btn.dropdown-toggle[data-toggle=dropdown] { @extend %dropdown-open !optional; @include border-bottom-radius(0); z-index: $zindex-dropdown + 1 !important; &:after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px ; z-index: $zindex-dropdown + 2; } } & > .dropdown-menu {} } // Right aligned dropdowns // --------------------------- .pull-right > .dropdown-menu { right: 0; left: auto; } // Stili per tutti gli allineamenti // –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– // // Sub menus // // –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– // .dropdown-submenu { // position: relative; // } // .dropdown-submenu > .dropdown-menu { // top: 0; // left: 100%; // @include border-radius(0 $base-border-radius $base-border-radius $base-border-radius); // } // .dropdown-submenu:hover > .dropdown-menu { // // display: block; // // @extend %fadeIn; // } // .dropdown-submenu > a { // @extend %caret-side !optional; // &:after {margin-left: em(10px);} // } // Animazione Apertura / Chiusura // –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– .dropdown-menu { @include transition(); opacity: 0; overflow: hidden; max-height: 0; } // .dropdown-submenu:hover > .dropdown-menu, .open > .dropdown-menu { opacity: 1; max-height: 600px; } // Apertura on hover per dropdown se dentro