dropdowns.less 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. //
  2. // Dropdowns
  3. // --------------------------------------------------
  4. // Unify .btn-link appearance with anchors
  5. .dropdown-menu > li > a,
  6. .dropdown-menu > li > .btn-link,
  7. .modal-menu > li > a,
  8. .modal-menu > li > .btn-link {
  9. display: block;
  10. border: none;
  11. clear: both;
  12. float: none;
  13. padding: 6px 20px;
  14. width: 100%;
  15. color: @dropdown-link-color;
  16. font-weight: normal;
  17. line-height: @line-height-base;
  18. text-align: left;
  19. white-space: nowrap;
  20. &:hover,
  21. &:focus {
  22. background-color: @dropdown-link-hover-bg;
  23. color: @dropdown-link-hover-color;
  24. text-decoration: none;
  25. }
  26. &:active {
  27. background-color: @dropdown-link-hover-bg;
  28. color: @dropdown-link-hover-color;
  29. text-decoration: none;
  30. }
  31. &:disabled {
  32. color: fadeOut(@dropdown-link-color, 50);
  33. }
  34. // Set material icons in dropdown menus
  35. .material-icon {
  36. margin: -2px 0px;
  37. margin-right: @line-height-computed * 0.35;
  38. position: relative;
  39. bottom: 1px;
  40. font-size: 18px;
  41. }
  42. .badge {
  43. float: right;
  44. position: relative;
  45. top: 1px;
  46. }
  47. }
  48. // Extra overrides for modal nav
  49. .modal-menu {
  50. margin: @line-height-computed 0px;
  51. padding: 0px;
  52. }
  53. .modal-menu > li {
  54. margin: @line-height-computed / 3 0px;
  55. padding: 0px;
  56. list-style: none;
  57. }
  58. // Bump min dropdown width to 210px
  59. .dropdown-menu {
  60. min-width: 210px;
  61. }
  62. // Dropdown footer
  63. .dropdown-menu .dropdown-footer {
  64. padding: 6px 20px;
  65. }
  66. // Dropdown buttons container
  67. .dropdown-menu .dropdown-buttons {
  68. padding: 2px 20px;
  69. padding-bottom: 7px;
  70. .btn {
  71. margin: 4px 0px;
  72. }
  73. }
  74. // Navbar's dropdown
  75. .mobile-dropdown {
  76. position: relative;
  77. }
  78. .mobile-dropdown.open > .dropdown-menu,
  79. .compact-nav.open > .dropdown-menu {
  80. border: none;
  81. border-radius: 0;
  82. display: block;
  83. margin: 0px;
  84. width: 100%;
  85. }
  86. // Guest menu
  87. .user-dropdown .guest-preview {
  88. text-align: center;
  89. .row {
  90. margin: 0px;
  91. }
  92. }
  93. // User menu
  94. .navbar .user-dropdown {
  95. width: 240px;
  96. }
  97. .user-dropdown .dropdown-header {
  98. padding: 6px 20px;
  99. font-size: @font-size-large;
  100. strong {
  101. font-weight: normal;
  102. }
  103. }
  104. // Category picker
  105. .category-picker .dropdown-menu {
  106. // Make category picker wider on desktops
  107. @media screen and (min-width: @screen-md-min) {
  108. width: 300px;
  109. }
  110. }
  111. .category-picker .dropdown-menu > li > .btn-link {
  112. white-space: normal;
  113. overflow-wrap: break-word;
  114. }
  115. // Stick to bottom on mobile
  116. @media screen and (max-width: @screen-xs-max) {
  117. .dropdown-menu.stick-to-bottom {
  118. border-radius: 0px;
  119. border: none;
  120. max-height: 400px;
  121. overflow-y: auto;
  122. .box-shadow(0px 0px @line-height-computed * 1.5 @gray-light);
  123. clear: both;
  124. top: auto;
  125. width: 100%;
  126. position: fixed;
  127. bottom: 0px;
  128. margin: 0px;
  129. padding: 0px;
  130. padding-bottom: @line-height-computed;
  131. li {
  132. float: none;
  133. margin: 0px;
  134. clear: both;
  135. & > a,
  136. & > .btn {
  137. padding-top: @line-height-computed * 0.75;
  138. padding-bottom: @line-height-computed * 0.75;
  139. border-bottom: 1px solid @dropdown-divider-bg;
  140. }
  141. }
  142. }
  143. }