ng-multiselect-dropdown.theme.scss 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. $base-color: #337ab7;
  2. $disable-background-color: #eceeef;
  3. .multiselect-dropdown {
  4. position: relative;
  5. width: 100%;
  6. font-size: inherit;
  7. font-family: inherit;
  8. .dropdown-btn {
  9. display: inline-block;
  10. border: 1px solid #adadad;
  11. width: 100%;
  12. padding: 6px 12px;
  13. margin-bottom: 0;
  14. font-weight: normal;
  15. line-height: 1.52857143;
  16. text-align: left;
  17. vertical-align: middle;
  18. cursor: pointer;
  19. background-image: none;
  20. border-radius: 4px;
  21. .selected-item {
  22. border: 1px solid $base-color;
  23. margin-right: 4px;
  24. background: $base-color;
  25. padding: 0px 5px;
  26. color: #fff;
  27. border-radius: 2px;
  28. float: left;
  29. a {
  30. text-decoration: none;
  31. }
  32. }
  33. .selected-item:hover {
  34. box-shadow: 1px 1px #959595;
  35. }
  36. .dropdown-down {
  37. display: inline-block;
  38. top: 10px;
  39. width: 0;
  40. height: 0;
  41. border-top: 10px solid #adadad;
  42. border-left: 10px solid transparent;
  43. border-right: 10px solid transparent;
  44. }
  45. .dropdown-up {
  46. display: inline-block;
  47. width: 0;
  48. height: 0;
  49. border-bottom: 10px solid #adadad;
  50. border-left: 10px solid transparent;
  51. border-right: 10px solid transparent;
  52. }
  53. }
  54. .disabled {
  55. & > span {
  56. background-color: $disable-background-color;
  57. }
  58. }
  59. }
  60. .dropdown-list {
  61. position: absolute;
  62. padding-top: 6px;
  63. width: 100%;
  64. z-index: 9999;
  65. border: 1px solid #ccc;
  66. border-radius: 3px;
  67. background: #fff;
  68. margin-top: 10px;
  69. box-shadow: 0px 1px 5px #959595;
  70. ul {
  71. padding: 0px;
  72. list-style: none;
  73. overflow: auto;
  74. margin: 0px;
  75. }
  76. li {
  77. padding: 6px 10px;
  78. cursor: pointer;
  79. text-align: left;
  80. }
  81. .filter-textbox {
  82. border-bottom: 1px solid #ccc;
  83. position: relative;
  84. padding: 10px;
  85. input {
  86. border: 0px;
  87. width: 100%;
  88. padding: 0px 0px 0px 26px;
  89. }
  90. input:focus {
  91. outline: none;
  92. }
  93. }
  94. }
  95. .multiselect-item-checkbox input[type='checkbox'] {
  96. border: 0;
  97. clip: rect(0 0 0 0);
  98. height: 1px;
  99. margin: -1px;
  100. overflow: hidden;
  101. padding: 0;
  102. position: absolute;
  103. width: 1px;
  104. }
  105. .multiselect-item-checkbox input[type='checkbox']:focus + div:before,
  106. .multiselect-item-checkbox input[type='checkbox']:hover + div:before {
  107. border-color: $base-color;
  108. background-color: #f2f2f2;
  109. }
  110. .multiselect-item-checkbox input[type='checkbox']:active + div:before {
  111. transition-duration: 0s;
  112. }
  113. .multiselect-item-checkbox input[type='checkbox'] + div {
  114. position: relative;
  115. padding-left: 2em;
  116. vertical-align: middle;
  117. user-select: none;
  118. cursor: pointer;
  119. margin: 0px;
  120. color: #000;
  121. }
  122. .multiselect-item-checkbox input[type='checkbox'] + div:before {
  123. box-sizing: content-box;
  124. content: '';
  125. color: $base-color;
  126. position: absolute;
  127. top: 50%;
  128. left: 0;
  129. width: 14px;
  130. height: 14px;
  131. margin-top: -9px;
  132. border: 2px solid $base-color;
  133. text-align: center;
  134. transition: all 0.4s ease;
  135. }
  136. .multiselect-item-checkbox input[type='checkbox'] + div:after {
  137. box-sizing: content-box;
  138. content: '';
  139. background-color: $base-color;
  140. position: absolute;
  141. top: 50%;
  142. left: 4px;
  143. width: 10px;
  144. height: 10px;
  145. margin-top: -5px;
  146. transform: scale(0);
  147. transform-origin: 50%;
  148. transition: transform 200ms ease-out;
  149. }
  150. .multiselect-item-checkbox input[type='checkbox']:disabled + div:before {
  151. border-color: #cccccc;
  152. }
  153. .multiselect-item-checkbox
  154. input[type='checkbox']:disabled:focus
  155. + div:before
  156. .multiselect-item-checkbox
  157. input[type='checkbox']:disabled:hover
  158. + div:before {
  159. background-color: inherit;
  160. }
  161. .multiselect-item-checkbox
  162. input[type='checkbox']:disabled:checked
  163. + div:before {
  164. background-color: #cccccc;
  165. }
  166. .multiselect-item-checkbox input[type='checkbox'] + div:after {
  167. background-color: transparent;
  168. top: 50%;
  169. left: 4px;
  170. width: 8px;
  171. height: 3px;
  172. margin-top: -4px;
  173. border-style: solid;
  174. border-color: #ffffff;
  175. border-width: 0 0 3px 3px;
  176. border-image: none;
  177. transform: rotate(-45deg) scale(0);
  178. }
  179. .multiselect-item-checkbox input[type='checkbox']:checked + div:after {
  180. content: '';
  181. transform: rotate(-45deg) scale(1);
  182. transition: transform 200ms ease-out;
  183. }
  184. .multiselect-item-checkbox input[type='checkbox']:checked + div:before {
  185. animation: borderscale 200ms ease-in;
  186. background: $base-color;
  187. }
  188. .multiselect-item-checkbox input[type='checkbox']:checked + div:after {
  189. transform: rotate(-45deg) scale(1);
  190. }
  191. @keyframes borderscale {
  192. 50% {
  193. box-shadow: 0 0 0 2px $base-color;
  194. }
  195. }