Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

dropdowns.less 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. // DROPDOWN MENUS
  2. // --------------
  3. // Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
  4. .dropdown {
  5. position: relative;
  6. }
  7. .dropdown-toggle {
  8. // The caret makes the toggle a bit too tall in IE7
  9. *margin-bottom: -3px;
  10. }
  11. .dropdown-toggle:active,
  12. .open .dropdown-toggle {
  13. outline: 0;
  14. }
  15. // Dropdown arrow/caret
  16. .caret {
  17. display: inline-block;
  18. width: 0;
  19. height: 0;
  20. text-indent: -99999px;
  21. // IE7 won't do the border trick if there's a text indent, but it doesn't
  22. // do the content that text-indent is hiding, either, so we're ok.
  23. *text-indent: 0;
  24. vertical-align: top;
  25. border-left: 4px solid transparent;
  26. border-right: 4px solid transparent;
  27. border-top: 4px solid @black;
  28. .opacity(30);
  29. content: "\2193";
  30. }
  31. .dropdown .caret {
  32. margin-top: 8px;
  33. margin-left: 2px;
  34. }
  35. .dropdown:hover .caret,
  36. .open.dropdown .caret {
  37. .opacity(100);
  38. }
  39. // The dropdown menu (ul)
  40. .dropdown-menu {
  41. position: absolute;
  42. top: 100%;
  43. left: 0;
  44. z-index: @zindexDropdown;
  45. float: left;
  46. display: none; // none by default, but block on "open" of the menu
  47. min-width: 160px;
  48. max-width: 220px;
  49. _width: 160px;
  50. padding: 4px 0;
  51. margin: 0; // override default ul
  52. list-style: none;
  53. background-color: @white;
  54. border-color: #ccc;
  55. border-color: rgba(0,0,0,.2);
  56. border-style: solid;
  57. border-width: 1px;
  58. .border-radius(0 0 5px 5px);
  59. .box-shadow(0 5px 10px rgba(0,0,0,.2));
  60. -webkit-background-clip: padding-box;
  61. -moz-background-clip: padding;
  62. background-clip: padding-box;
  63. *border-right-width: 2px;
  64. *border-bottom-width: 2px;
  65. // Allow for dropdowns to go bottom up (aka, dropup-menu)
  66. &.bottom-up {
  67. top: auto;
  68. bottom: 100%;
  69. margin-bottom: 2px;
  70. }
  71. // Dividers (basically an hr) within the dropdown
  72. .divider {
  73. height: 1px;
  74. margin: 5px 1px;
  75. overflow: hidden;
  76. background-color: #e5e5e5;
  77. border-bottom: 1px solid @white;
  78. // IE7 needs a set width since we gave a height. Restricting just
  79. // to IE7 to keep the 1px left/right space in other browsers.
  80. // It is unclear where IE is getting the extra space that we need
  81. // to negative-margin away, but so it goes.
  82. *width: 100%;
  83. *margin: -5px 0 5px;
  84. }
  85. // Links within the dropdown menu
  86. a {
  87. display: block;
  88. padding: 3px 15px;
  89. clear: both;
  90. font-weight: normal;
  91. line-height: 18px;
  92. color: @gray;
  93. white-space: nowrap;
  94. }
  95. }
  96. // Hover state
  97. .dropdown-menu li > a:hover,
  98. .dropdown-menu .active > a,
  99. .dropdown-menu .active > a:hover {
  100. color: @white;
  101. text-decoration: none;
  102. background-color: @linkColor;
  103. }
  104. // Open state for the dropdown
  105. .dropdown.open {
  106. // IE7's z-index only goes to the nearest positioned ancestor, which would
  107. // make the menu appear below buttons that appeared later on the page
  108. *z-index: @zindexDropdown;
  109. .dropdown-toggle {
  110. color: @white;
  111. background: #ccc;
  112. background: rgba(0,0,0,.3);
  113. }
  114. .dropdown-menu {
  115. display: block;
  116. }
  117. }
  118. // Typeahead
  119. .typeahead {
  120. margin-top: 2px; // give it some space to breathe
  121. .border-radius(4px);
  122. }