No Description

_dropdown.scss 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. .dropdown-menu {
  2. border: 0;
  3. box-shadow: 0px 10px 50px 0px rgba(0, 0, 0, 0.2);
  4. border-radius: $border-radius-xs;
  5. @include transitions($fast-transition-time, $transition-linear);
  6. &.dropdown-menu-right {
  7. &:before, &:after {
  8. left:auto;
  9. right: 10px;
  10. }
  11. }
  12. &.dropdown-black {
  13. background: linear-gradient(to bottom, $black 0%, $black-states 100%);
  14. border: 1px solid $default;
  15. .dropdown-item {
  16. color: rgba(255, 255, 255, 0.7);
  17. }
  18. .dropdown-divider {
  19. border-color: $default;
  20. }
  21. &:before {
  22. color: $black;
  23. z-index: 2;
  24. }
  25. &:after {
  26. display: inline-block;
  27. position: absolute;
  28. width: 0;
  29. height: 0;
  30. z-index: 1;
  31. vertical-align: middle;
  32. content: "";
  33. top: -6px;
  34. left: 10px;
  35. right: auto;
  36. color: $default;
  37. border-bottom: .4em solid;
  38. border-right: .4em solid transparent;
  39. border-left: .4em solid transparent;
  40. }
  41. &.dropdown-menu-right {
  42. &:after {
  43. left: auto;
  44. right: 10px;
  45. }
  46. }
  47. .dropup & {
  48. &:after {
  49. color: $black-states;
  50. z-index: 2;
  51. }
  52. &:before {
  53. display: inline-block;
  54. position: absolute;
  55. width: 0;
  56. height: 0;
  57. vertical-align: middle;
  58. content: "";
  59. top: auto;
  60. bottom: -6px;
  61. right: auto;
  62. left: 10px;
  63. color: $dark-background;
  64. border-top: .4em solid;
  65. border-right: .4em solid transparent;
  66. border-left: .4em solid transparent;
  67. border-bottom: none;
  68. z-index: 1;
  69. }
  70. }
  71. }
  72. i {
  73. margin-right: 5px;
  74. position: relative;
  75. top: 1px;
  76. }
  77. .tim-icons {
  78. margin-right: 10px;
  79. position: relative;
  80. top: 4px;
  81. font-size: 18px;
  82. margin-top: -5px;
  83. opacity: .5;
  84. }
  85. .dropdown-item {
  86. &.active,
  87. &:active{
  88. color: inherit;
  89. }
  90. }
  91. .dropup & {
  92. &:before {
  93. display: none;
  94. }
  95. &:after {
  96. display: inline-block;
  97. position: absolute;
  98. width: 0;
  99. height: 0;
  100. vertical-align: middle;
  101. content: "";
  102. top: auto;
  103. bottom: -5px;
  104. right: auto;
  105. left: 10px;
  106. color: $white;
  107. border-top: .4em solid;
  108. border-right: .4em solid transparent;
  109. border-left: .4em solid transparent;
  110. border-bottom: none;
  111. }
  112. &.dropdown-menu-right {
  113. &:after, &:before {
  114. right: 10px;
  115. left: auto;
  116. }
  117. }
  118. }
  119. &:before {
  120. display: inline-block;
  121. position: absolute;
  122. width: 0;
  123. height: 0;
  124. vertical-align: middle;
  125. content: "";
  126. top: -5px;
  127. left: 10px;
  128. right: auto;
  129. color: $white;
  130. border-bottom: .4em solid;
  131. border-right: .4em solid transparent;
  132. border-left: .4em solid transparent;
  133. }
  134. &.dropdown-menu-right {
  135. right: 0 !important;
  136. left: auto !important;
  137. }
  138. .dropdown-item,
  139. .bootstrap-select &.inner li a {
  140. font-size: $font-size-sm;
  141. padding-top: .6rem;
  142. padding-bottom: .6rem;
  143. margin-top: 5px;
  144. @include transitions($fast-transition-time, $transition-linear);
  145. &:hover,
  146. &:focus {
  147. background-color: $opacity-gray-3;
  148. }
  149. &.disabled,
  150. &:disabled {
  151. color: $default-opacity;
  152. &:hover,
  153. &:focus {
  154. background-color: transparent;
  155. box-shadow: none;
  156. }
  157. }
  158. }
  159. .dropdown-divider {
  160. background-color: $opacity-gray-5;
  161. }
  162. .dropdown-header:not([href]):not([tabindex]) {
  163. color: $default-opacity;
  164. font-size: $font-size-xs;
  165. text-transform: uppercase;
  166. font-weight: $font-weight-bold;
  167. }
  168. &.dropdown-primary {
  169. @include dropdown-colors(darken($primary, 3%),$opacity-8,$white, $opacity-2);
  170. }
  171. &.dropdown-info {
  172. @include dropdown-colors(darken($info, 3%),$opacity-8,$white, $opacity-2);
  173. }
  174. &.dropdown-danger {
  175. @include dropdown-colors(darken($danger, 3%),$opacity-8,$white, $opacity-2);
  176. }
  177. &.dropdown-success {
  178. @include dropdown-colors(darken($success, 3%),$opacity-8,$white, $opacity-2);
  179. }
  180. &.dropdown-warning {
  181. @include dropdown-colors(darken($warning, 3%),$opacity-8,$white, $opacity-2);
  182. }
  183. .dropdown &,
  184. .dropup:not(.bootstrap-select) &,
  185. .bootstrap-select &:not(.inner),
  186. &.bootstrap-datetimepicker-widget.bottom {
  187. @include transform-translate-y-dropdown(-20px);
  188. visibility: hidden;
  189. display: block;
  190. @include opacity(0);
  191. top: 100% !important;
  192. }
  193. &.bootstrap-datetimepicker-widget.top {
  194. @include transform-translate-y-dropdown(-20px);
  195. visibility: hidden;
  196. display: block;
  197. @include opacity(0);
  198. }
  199. &.bootstrap-datetimepicker-widget.top,
  200. &.bootstrap-datetimepicker-widget.bottom {
  201. @include transform-translate-y-dropdown(-20px);
  202. }
  203. .bootstrap-select.dropup &:not(.inner){
  204. @include transform-translate-y-dropdown(25px);
  205. }
  206. .dropup:not(.bootstrap-select) &{
  207. @include transform-translate-y-dropdown(20px);
  208. top: auto !important;
  209. bottom: 100%;
  210. }
  211. .dropdown.show &,
  212. .bootstrap-select.show &:not(.inner),
  213. &.bootstrap-datetimepicker-widget.top.open,
  214. &.bootstrap-datetimepicker-widget.bottom.open,
  215. .dropup.show:not(.bootstrap-select) &,
  216. .navbar .dropdown.show &{
  217. @include opacity(1);
  218. visibility: visible;
  219. @include transform-translate-y-dropdown(1px);
  220. }
  221. &.bootstrap-datetimepicker-widget.top.open,
  222. &.bootstrap-datetimepicker-widget.bottom.open{
  223. @include transform-translate-y-dropdown(0px);
  224. }
  225. .dropup.show:not(.bootstrap-select) &{
  226. @include transform-translate-y-dropdown(-2px);
  227. }
  228. &.dropdown-navbar{
  229. left: -80px;
  230. &:before, &:after{
  231. left: auto;
  232. right: 17px;
  233. }
  234. }
  235. }
  236. .btn{
  237. cursor: pointer;
  238. &.dropdown-toggle[data-toggle="dropdown"]{
  239. padding:10px;
  240. margin: 0;
  241. margin-bottom: 5px;
  242. &:after{
  243. content: "";
  244. margin-left: 5px;
  245. }
  246. }
  247. span.bs-caret{
  248. display: none;
  249. }
  250. &.btn-link{
  251. &.dropdown-toggle{
  252. height: 22px;
  253. padding: 0;
  254. margin-right: 5px;
  255. }
  256. }
  257. }
  258. .dropdown-toggle:after{
  259. content: unset;
  260. }
  261. .btn:not(:disabled):not(.disabled).active:focus,
  262. .btn:not(:disabled):not(.disabled):active:focus,
  263. .show>.btn.dropdown-toggle:focus{
  264. box-shadow: none;
  265. }
  266. // Dropown: Sizes
  267. .dropdown-menu-sm {
  268. min-width: 100px;
  269. border: $border-radius-lg;
  270. }
  271. .dropdown-menu-lg {
  272. min-width: 260px;
  273. border-radius: $border-radius-lg;
  274. }
  275. .dropdown-menu-xl {
  276. min-width: 450px;
  277. border-radius: $border-radius-lg;
  278. }
  279. @media screen and (max-width: 991px){
  280. .dropdown-toggle:after{
  281. display: inline-block;
  282. width: 0;
  283. height: 0;
  284. margin-left: .255em;
  285. vertical-align: .255em;
  286. content: "";
  287. border-top: .3em solid;
  288. border-right: .3em solid transparent;
  289. border-bottom: 0;
  290. border-left: .3em solid transparent;
  291. }
  292. }
  293. @media screen and (min-width: 992px){
  294. .dropdown-menu .dropdown-item{
  295. color: $dark-gray;
  296. }
  297. }