_dropdown.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /*
  2. * Component: Dropdown
  3. * -------------------
  4. */
  5. // General Dropdown Rules
  6. //.dropdown-item {
  7. // &:first-of-type {
  8. // @include border-top-radius($border-radius);
  9. // }
  10. // &:last-of-type {
  11. // @include border-bottom-radius($border-radius);
  12. // }
  13. //}
  14. .dropdown-item-title {
  15. font-size: $font-size-base;
  16. margin: 0;
  17. }
  18. // Dropdown Sizes
  19. .dropdown-menu-lg {
  20. max-width: 300px;
  21. min-width: 280px;
  22. padding: 0;
  23. .dropdown-divider {
  24. margin: 0;
  25. }
  26. .dropdown-item {
  27. padding: $dropdown-padding-y $dropdown-item-padding-x;
  28. }
  29. p {
  30. margin: 0;
  31. white-space: normal;
  32. }
  33. }
  34. // Dropdown header and footer
  35. .dropdown-footer,
  36. .dropdown-header {
  37. display: block;
  38. font-size: $font-size-sm;
  39. padding: .5rem $dropdown-item-padding-x;
  40. text-align: center;
  41. }
  42. /* Add fade animation to dropdown menus by appending
  43. the class .animated-dropdown-menu to the .dropdown-menu ul (or ol)*/
  44. .open:not(.dropup) > .animated-dropdown-menu {
  45. @include animation(flipInX .7s both);
  46. backface-visibility: visible !important;
  47. }
  48. @keyframes flipInX {
  49. 0% {
  50. transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
  51. transition-timing-function: ease-in;
  52. opacity: 0;
  53. }
  54. 40% {
  55. transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
  56. transition-timing-function: ease-in;
  57. }
  58. 60% {
  59. transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
  60. opacity: 1;
  61. }
  62. 80% {
  63. transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
  64. }
  65. 100% {
  66. transform: perspective(400px);
  67. }
  68. }
  69. @-webkit-keyframes flipInX {
  70. 0% {
  71. -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
  72. -webkit-transition-timing-function: ease-in;
  73. opacity: 0;
  74. }
  75. 40% {
  76. -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
  77. -webkit-transition-timing-function: ease-in;
  78. }
  79. 60% {
  80. -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
  81. opacity: 1;
  82. }
  83. 80% {
  84. -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
  85. }
  86. 100% {
  87. -webkit-transform: perspective(400px);
  88. }
  89. }
  90. /* Fix dropdown menu in navbars */
  91. .navbar-custom-menu > .navbar-nav {
  92. > li {
  93. position: relative;
  94. > .dropdown-menu {
  95. position: absolute;
  96. right: 0;
  97. left: auto;
  98. }
  99. }
  100. }
  101. @include media-breakpoint-down(sm) {
  102. .navbar-custom-menu > .navbar-nav {
  103. float: right;
  104. > li {
  105. position: static;
  106. > .dropdown-menu {
  107. position: absolute;
  108. right: 5%;
  109. left: auto;
  110. border: 1px solid #ddd;
  111. background: $white;
  112. }
  113. }
  114. }
  115. }
  116. /* User Menu */
  117. .navbar-nav > .user-menu {
  118. > .nav-link:after {
  119. content:none;
  120. }
  121. > .dropdown-menu {
  122. @include border-top-radius(0);
  123. padding: 0;
  124. border-top-width: 0;
  125. width: 280px;
  126. &,
  127. > .user-body {
  128. @include border-bottom-radius(4px);
  129. }
  130. // Header menu
  131. > li.user-header {
  132. height: 175px;
  133. padding: 10px;
  134. text-align: center;
  135. // User image
  136. > img {
  137. z-index: 5;
  138. height: 90px;
  139. width: 90px;
  140. border: 3px solid;
  141. border-color: transparent;
  142. border-color: rgba(255, 255, 255, 0.2);
  143. }
  144. > p {
  145. z-index: 5;
  146. font-size: 17px;
  147. //text-shadow: 2px 2px 3px #333333;
  148. margin-top: 10px;
  149. > small {
  150. display: block;
  151. font-size: 12px;
  152. }
  153. }
  154. }
  155. // Menu Body
  156. > .user-body {
  157. padding: 15px;
  158. border-bottom: 1px solid #f4f4f4;
  159. border-top: 1px solid #dddddd;
  160. @include clearfix;
  161. a {
  162. color: #444 !important;
  163. @include media-breakpoint-up(sm) {
  164. background: #fff !important;
  165. color: #444 !important;
  166. }
  167. }
  168. }
  169. // Menu Footer
  170. > .user-footer {
  171. background-color: #f9f9f9;
  172. padding: 10px;
  173. @include clearfix;
  174. .btn-default {
  175. color: #666666;
  176. &:hover {
  177. @include media-breakpoint-up(sm) {
  178. background-color: #f9f9f9;
  179. }
  180. }
  181. }
  182. }
  183. }
  184. .user-image {
  185. float: left;
  186. width: 25px;
  187. height: 25px;
  188. border-radius: 50%;
  189. margin-right: 10px;
  190. margin-top: -2px;
  191. @include media-breakpoint-up(sm) {
  192. float: none;
  193. margin-right: 0;
  194. margin-top: -8px;
  195. line-height: 10px;
  196. }
  197. }
  198. }