dropdowns.less 2.9 KB

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