dropdowns.less 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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: 4px 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. // Set material icons in dropdown menus
  26. .material-icon {
  27. margin: -2px 0px;
  28. margin-right: @line-height-computed * .35;
  29. position: relative;
  30. bottom: 1px;
  31. font-size: 18px;
  32. }
  33. .badge {
  34. float: right;
  35. }
  36. }
  37. // Extra overrides for modal nav
  38. .modal-menu {
  39. margin: @line-height-computed 0px;
  40. padding: 0px;
  41. }
  42. .modal-menu>li {
  43. margin: @line-height-computed / 3 0px;
  44. padding: 0px;
  45. list-style: none;
  46. }
  47. // Bump min dropdown width to 210px
  48. .dropdown-menu {
  49. width: 210px;
  50. }
  51. // Dropdown footer
  52. .dropdown-menu .dropdown-footer {
  53. padding: 6px 20px;
  54. }
  55. // Dropdown buttons container
  56. .dropdown-menu .dropdown-buttons {
  57. padding: 2px 20px;
  58. .btn {
  59. margin: 4px 0px;
  60. }
  61. }
  62. // Always displayed on mobile dropdown
  63. .mobile-dropdown, .compact-nav {
  64. position: static;
  65. margin: 0px;
  66. overflow: auto;
  67. &.open {
  68. margin-bottom: @line-height-computed;
  69. }
  70. }
  71. .compact-nav.open {
  72. margin-top: @line-height-computed * -1;
  73. }
  74. .mobile-dropdown.open>.dropdown-menu, .compact-nav.open>.dropdown-menu {
  75. border: none;
  76. border-radius: 0;
  77. .box-shadow(none);
  78. display: block;
  79. margin: 0px;
  80. width: 100%;
  81. position: static;
  82. }
  83. // Guest menu
  84. .user-dropdown .guest-preview {
  85. text-align: center;
  86. .row {
  87. margin: 0px;
  88. }
  89. }
  90. // User menu
  91. .navbar .user-dropdown {
  92. width: 240px;
  93. }
  94. .user-dropdown .dropdown-header {
  95. padding: 6px 20px;
  96. font-size: @font-size-large;
  97. strong {
  98. font-weight: normal;
  99. }
  100. }
  101. // Category picker
  102. .category-picker .dropdown-menu {
  103. // Make category picker wider on desktops
  104. @media screen and (min-width: @screen-md-min) {
  105. width: 300px;
  106. }
  107. }
  108. .category-picker .dropdown-menu>li>.btn-link {
  109. white-space: normal;
  110. word-wrap: break-word;
  111. }