_select2.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. .select2-container {
  2. &.form-control {
  3. background: transparent;
  4. border: none;
  5. display: block;
  6. margin: 0;
  7. padding: 0;
  8. }
  9. .select2-choices .select2-search-field input,
  10. .select2-choice,
  11. .select2-choices {
  12. background: none;
  13. border-radius: 4px;
  14. color: #555;
  15. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  16. background-color: #FFF;
  17. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  18. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  19. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  20. border-color: #ccc;
  21. padding: 0;
  22. }
  23. }
  24. .select2-search input {
  25. border-radius: 4px;
  26. color: #555;
  27. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  28. background-color: #FFF;
  29. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  30. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  31. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  32. border-color: #ccc;
  33. }
  34. .select2-container {
  35. .select2-choices .select2-search-field input {
  36. -webkit-box-shadow: none;
  37. box-shadow: none;
  38. }
  39. .select2-choice {
  40. height: 34px;
  41. line-height: 1.42857;
  42. }
  43. &.select2-container-multi.form-control {
  44. height: auto;
  45. }
  46. &.input-sm .select2-choice {
  47. height: 30px;
  48. line-height: 1.5;
  49. border-radius: 3px;
  50. }
  51. }
  52. .input-group-sm .select2-container .select2-choice {
  53. height: 30px;
  54. line-height: 1.5;
  55. border-radius: 3px;
  56. }
  57. .select2-container.input-lg .select2-choice,
  58. .input-group-lg .select2-container .select2-choice {
  59. height: 45px;
  60. line-height: 1.33;
  61. border-radius: 6px;
  62. }
  63. .select2-container-multi {
  64. .select2-choices .select2-search-field input {
  65. height: 32px;
  66. margin: 0;
  67. }
  68. &.input-sm .select2-choices .select2-search-field input {
  69. height: 28px;
  70. }
  71. }
  72. .input-group-sm .select2-container-multi .select2-choices .select2-search-field input {
  73. height: 28px;
  74. }
  75. .select2-container-multi.input-lg .select2-choices .select2-search-field input,
  76. .input-group-lg .select2-container-multi .select2-choices .select2-search-field input {
  77. height: 43px;
  78. }
  79. .select2-chosen,
  80. .select2-choice > span:first-child,
  81. .select2-container .select2-choices .select2-search-field input {
  82. padding: 6px 12px;
  83. }
  84. .input-sm .select2-chosen,
  85. .input-group-sm .select2-chosen,
  86. .input-sm .select2-choice > span:first-child,
  87. .input-group-sm .select2-choice > span:first-child,
  88. .input-sm .select2-choices .select2-search-field input,
  89. .input-group-sm .select2-choices .select2-search-field input {
  90. padding: 5px 10px;
  91. }
  92. .input-lg .select2-chosen,
  93. .input-group-lg .select2-chosen,
  94. .input-lg .select2-choice > span:first-child,
  95. .input-group-lg .select2-choice > span:first-child,
  96. .input-lg .select2-choices .select2-search-field input,
  97. .input-group-lg .select2-choices .select2-search-field input {
  98. padding: 10px 16px;
  99. }
  100. .select2-container-multi {
  101. .select2-choices .select2-search-choice {
  102. margin-top: 5px;
  103. margin-bottom: 3px;
  104. color: #fff;
  105. background: $color-primary;
  106. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  107. -webkit-box-shadow: none;
  108. box-shadow: none;
  109. border: 0 none;
  110. font-size: 75%;
  111. font-weight: bold;
  112. }
  113. &.input-sm .select2-choices .select2-search-choice {
  114. margin-top: 3px;
  115. margin-bottom: 2px;
  116. }
  117. }
  118. .input-group-sm .select2-container-multi .select2-choices .select2-search-choice {
  119. margin-top: 3px;
  120. margin-bottom: 2px;
  121. }
  122. .select2-container-multi.input-lg .select2-choices .select2-search-choice,
  123. .input-group-lg .select2-container-multi .select2-choices .select2-search-choice {
  124. line-height: 24px;
  125. }
  126. .select2-container .select2-choice {
  127. .select2-arrow, div {
  128. border-left: 1px solid #ccc;
  129. background: none;
  130. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  131. }
  132. }
  133. .select2-dropdown-open .select2-choice {
  134. .select2-arrow, div {
  135. border-left-color: transparent;
  136. background: none;
  137. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  138. }
  139. }
  140. .select2-container .select2-choice {
  141. .select2-arrow b, div b {
  142. background-position: 0 3px;
  143. }
  144. }
  145. .select2-dropdown-open .select2-choice {
  146. .select2-arrow b, div b {
  147. background-position: -18px 3px;
  148. }
  149. }
  150. .select2-container.input-sm .select2-choice .select2-arrow b,
  151. .input-group-sm .select2-container .select2-choice .select2-arrow b,
  152. .select2-container.input-sm .select2-choice div b,
  153. .input-group-sm .select2-container .select2-choice div b {
  154. background-position: 0 1px;
  155. }
  156. .select2-dropdown-open.input-sm .select2-choice .select2-arrow b,
  157. .input-group-sm .select2-dropdown-open .select2-choice .select2-arrow b,
  158. .select2-dropdown-open.input-sm .select2-choice div b,
  159. .input-group-sm .select2-dropdown-open .select2-choice div b {
  160. background-position: -18px 1px;
  161. }
  162. .select2-container.input-lg .select2-choice .select2-arrow b,
  163. .input-group-lg .select2-container .select2-choice .select2-arrow b,
  164. .select2-container.input-lg .select2-choice div b,
  165. .input-group-lg .select2-container .select2-choice div b {
  166. background-position: 0 9px;
  167. }
  168. .select2-dropdown-open.input-lg .select2-choice .select2-arrow b,
  169. .input-group-lg .select2-dropdown-open .select2-choice .select2-arrow b,
  170. .select2-dropdown-open.input-lg .select2-choice div b,
  171. .input-group-lg .select2-dropdown-open .select2-choice div b {
  172. background-position: -18px 9px;
  173. }
  174. .has-warning {
  175. .select2-choice,
  176. .select2-choices {
  177. border-color: #c09853;
  178. }
  179. .select2-container-active .select2-choice,
  180. .select2-container-multi.select2-container-active .select2-choices {
  181. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
  182. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
  183. border-color: #a47e3c;
  184. }
  185. &.select2-drop-active {
  186. border-color: #a47e3c;
  187. &.select2-drop.select2-drop-above {
  188. border-top-color: #a47e3c;
  189. }
  190. }
  191. }
  192. .has-error {
  193. .select2-choice,
  194. .select2-choices {
  195. border-color: #b94a48;
  196. }
  197. .select2-container-active .select2-choice,
  198. .select2-container-multi.select2-container-active .select2-choices {
  199. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
  200. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
  201. border-color: #953b39;
  202. }
  203. &.select2-drop-active {
  204. border-color: #953b39;
  205. &.select2-drop.select2-drop-above {
  206. border-top-color: #953b39;
  207. }
  208. }
  209. }
  210. .has-success {
  211. .select2-choice,
  212. .select2-choices {
  213. border-color: #468847;
  214. }
  215. .select2-container-active .select2-choice,
  216. .select2-container-multi.select2-container-active .select2-choices {
  217. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
  218. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
  219. border-color: #356635;
  220. }
  221. &.select2-drop-active {
  222. border-color: #356635;
  223. &.select2-drop.select2-drop-above {
  224. border-top-color: #356635;
  225. }
  226. }
  227. }
  228. .select2-container-active .select2-choice,
  229. .select2-container-multi.select2-container-active .select2-choices {
  230. outline: none;
  231. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
  232. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
  233. -webkit-transition: border-color ease-in-out .15s box-shadow ease-in-out .15s;
  234. transition: border-color ease-in-out .15s box-shadow ease-in-out .15s;
  235. border-color: #66afe9;
  236. }
  237. .select2-drop-active {
  238. border-color: #66afe9;
  239. }
  240. .select2-drop-auto-width,
  241. .select2-drop.select2-drop-above.select2-drop-active {
  242. border-top-color: #66afe9;
  243. }
  244. .input-group {
  245. &.select2-bootstrap-prepend [class^=select2-choice] {
  246. border-bottom-left-radius: 0 !important;
  247. border-top-left-radius: 0 !important;
  248. }
  249. &.select2-bootstrap-append [class^=select2-choice] {
  250. border-bottom-right-radius: 0 !important;
  251. border-top-right-radius: 0 !important;
  252. }
  253. }
  254. .select2-dropdown-open {
  255. [class^=select2-choice] {
  256. border-bottom-right-radius: 0 !important;
  257. border-bottom-left-radius: 0 !important;
  258. }
  259. &.select2-drop-above [class^=select2-choice] {
  260. border-top-right-radius: 0 !important;
  261. border-top-left-radius: 0 !important;
  262. }
  263. }
  264. .select2-dropdown-open.select2-drop-above .select2-choice,
  265. .select2-dropdown-open.select2-drop-above .select2-choices {
  266. background: none;
  267. -webkit-box-shadow: none;
  268. box-shadow: none;
  269. }
  270. .select2-results .select2-highlighted {
  271. color: #FFF;
  272. background-color: #428bca;
  273. }
  274. .select2-bootstrap-append,
  275. .select2-bootstrap-prepend {
  276. .select2-container-multiple {
  277. vertical-align: top;
  278. }
  279. .input-group-btn {
  280. vertical-align: top;
  281. .btn {
  282. vertical-align: top;
  283. }
  284. }
  285. }
  286. .select2-container-multi .select2-choices .select2-search-choice-focus {
  287. background: #ebebeb;
  288. color: #333;
  289. -webkit-box-shadow: none;
  290. box-shadow: none;
  291. border-color: #adadad;
  292. }
  293. .select2-search-choice-close {
  294. background: none;
  295. margin-top: -8px;
  296. top: 50%;
  297. &:after {
  298. content: 'x';
  299. font-size: 10px;
  300. color: #fff;
  301. padding: 0 4px;
  302. font-weight: bold;
  303. }
  304. }
  305. .select2-container .select2-choice abbr {
  306. top: 50%;
  307. }
  308. .select2-results {
  309. .select2-no-results,
  310. .select2-searching,
  311. .select2-selection-limit {
  312. background-color: #fcf8e3;
  313. color: #c09853;
  314. }
  315. }
  316. .select2-container.select2-container-disabled {
  317. .select2-choice,
  318. .select2-choices {
  319. cursor: not-allowed;
  320. background-color: #eee;
  321. border-color: #ccc;
  322. }
  323. .select2-choice {
  324. .select2-arrow, div {
  325. background-color: transparent;
  326. border-left: 1px solid transparent;
  327. }
  328. }
  329. .select2-choices {
  330. .select2-arrow, div {
  331. background-color: transparent;
  332. border-left: 1px solid transparent;
  333. }
  334. }
  335. }
  336. .select2-search input.select2-active,
  337. .select2-container-multi .select2-choices .select2-search-field input.select2-active,
  338. .select2-more-results.select2-active {
  339. background-position: right 4px center;
  340. }
  341. // DARK SKIN
  342. // -----------------------------------------------------------------------------
  343. html.dark {
  344. .select2-container {
  345. .select2-choices .select2-search-field input,
  346. .select2-choice,
  347. .select2-choices {
  348. color: #EEE;
  349. background-color: $dark-color-3;
  350. border-color: $dark-color-3;
  351. }
  352. }
  353. .select2-search {
  354. position: relative;
  355. input {
  356. color: #EEE;
  357. background: $dark-color-4;
  358. border-color: $dark-color-5;
  359. &.select2-active {
  360. background: $dark-color-4;
  361. }
  362. }
  363. &:before {
  364. font-family: 'FontAwesome';
  365. content: "\f002";
  366. position: absolute;
  367. right: 15px;
  368. top: 50%;
  369. color: #EEE;
  370. font-size: 12px;
  371. margin: -11px 0 0;
  372. }
  373. }
  374. .select2-drop {
  375. background-color: $dark-color-3;
  376. border-color: $dark-color-2;
  377. }
  378. .select2-container-multi {
  379. .select2-choices .select2-search-choice {
  380. color: #EEE;
  381. }
  382. }
  383. .select2-container .select2-choice .select2-arrow,
  384. .select2-container .select2-choice div {
  385. border-color: $dark-color-3;
  386. }
  387. .select2-results .select2-result-label {
  388. color: #EEE;
  389. }
  390. }