select2.less 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. @input-border-color: @default-border-color;
  2. @border-color: @default-border-color;
  3. @light-bg-color: @gray-lighter;
  4. .select2-container {
  5. box-sizing: border-box;
  6. display: inline-block;
  7. margin: 0;
  8. position: relative;
  9. vertical-align: middle; }
  10. .select2-container .select2-selection--single {
  11. box-sizing: border-box;
  12. cursor: pointer;
  13. display: block;
  14. height: 28px;
  15. user-select: none;
  16. -webkit-user-select: none; }
  17. .select2-container .select2-selection--single .select2-selection__rendered {
  18. display: block;
  19. padding-left: 8px;
  20. padding-right: 20px;
  21. overflow: hidden;
  22. text-overflow: ellipsis;
  23. white-space: nowrap; }
  24. .select2-container .select2-selection--single .select2-selection__clear {
  25. position: relative; }
  26. .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
  27. padding-right: 8px;
  28. padding-left: 20px; }
  29. .select2-container .select2-selection--multiple {
  30. box-sizing: border-box;
  31. cursor: pointer;
  32. display: block;
  33. min-height: 32px;
  34. user-select: none;
  35. -webkit-user-select: none; }
  36. .select2-container .select2-selection--multiple .select2-selection__rendered {
  37. display: inline-block;
  38. overflow: hidden;
  39. padding-left: 8px;
  40. text-overflow: ellipsis;
  41. white-space: nowrap; }
  42. .select2-container .select2-search--inline {
  43. float: left; }
  44. .select2-container .select2-search--inline .select2-search__field {
  45. box-sizing: border-box;
  46. border: none;
  47. font-size: 100%;
  48. margin-top: 5px;
  49. padding: 0; }
  50. .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
  51. -webkit-appearance: none; }
  52. .select2-dropdown {
  53. background-color: white;
  54. border: 1px solid #aaa;
  55. border-radius: 4px;
  56. box-sizing: border-box;
  57. display: block;
  58. position: absolute;
  59. left: -100000px;
  60. width: 100%;
  61. z-index: 1051; }
  62. .select2-results {
  63. display: block; }
  64. .select2-results__options {
  65. list-style: none;
  66. margin: 0;
  67. padding: 0; }
  68. .select2-results__option {
  69. padding: 6px;
  70. user-select: none;
  71. -webkit-user-select: none; }
  72. .select2-results__option[aria-selected] {
  73. cursor: pointer; }
  74. .select2-container--open .select2-dropdown {
  75. left: 0; }
  76. .select2-container--open .select2-dropdown--above {
  77. border-bottom: none;
  78. border-bottom-left-radius: 0;
  79. border-bottom-right-radius: 0; }
  80. .select2-container--open .select2-dropdown--below {
  81. border-top: none;
  82. border-top-left-radius: 0;
  83. border-top-right-radius: 0; }
  84. .select2-search--dropdown {
  85. display: block;
  86. padding: 4px; }
  87. .select2-search--dropdown .select2-search__field {
  88. padding: 4px;
  89. width: 100%;
  90. box-sizing: border-box; }
  91. .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
  92. -webkit-appearance: none; }
  93. .select2-search--dropdown.select2-search--hide {
  94. display: none; }
  95. .select2-close-mask {
  96. border: 0;
  97. margin: 0;
  98. padding: 0;
  99. display: block;
  100. position: fixed;
  101. left: 0;
  102. top: 0;
  103. min-height: 100%;
  104. min-width: 100%;
  105. height: auto;
  106. width: auto;
  107. opacity: 0;
  108. z-index: 99;
  109. background-color: #fff;
  110. filter: alpha(opacity=0); }
  111. .select2-hidden-accessible {
  112. border: 0 !important;
  113. clip: rect(0 0 0 0) !important;
  114. -webkit-clip-path: inset(50%) !important;
  115. clip-path: inset(50%) !important;
  116. height: 1px !important;
  117. overflow: hidden !important;
  118. padding: 0 !important;
  119. position: absolute !important;
  120. width: 1px !important;
  121. white-space: nowrap !important; }
  122. .select2-container--default .select2-selection--single {
  123. background-color: #fff;
  124. border: 1px solid #aaa;
  125. border-radius: 4px; }
  126. .select2-container--default .select2-selection--single .select2-selection__rendered {
  127. color: #444;
  128. line-height: 28px; }
  129. .select2-container--default .select2-selection--single .select2-selection__clear {
  130. cursor: pointer;
  131. float: right;
  132. font-weight: bold; }
  133. .select2-container--default .select2-selection--single .select2-selection__placeholder {
  134. color: #999; }
  135. .select2-container--default .select2-selection--single .select2-selection__arrow {
  136. height: 26px;
  137. position: absolute;
  138. top: 1px;
  139. right: 1px;
  140. width: 20px; }
  141. .select2-container--default .select2-selection--single .select2-selection__arrow b {
  142. border-color: #888 transparent transparent transparent;
  143. border-style: solid;
  144. border-width: 5px 4px 0 4px;
  145. height: 0;
  146. left: 50%;
  147. margin-left: -4px;
  148. margin-top: -2px;
  149. position: absolute;
  150. top: 50%;
  151. width: 0; }
  152. .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
  153. float: left; }
  154. .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
  155. left: 1px;
  156. right: auto; }
  157. .select2-container--default.select2-container--disabled .select2-selection--single {
  158. background-color: #eee;
  159. cursor: default; }
  160. .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
  161. display: none; }
  162. .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  163. border-color: transparent transparent #888 transparent;
  164. border-width: 0 4px 5px 4px; }
  165. .select2-container--default .select2-selection--multiple {
  166. background-color: white;
  167. border: 1px solid #aaa;
  168. border-radius: 4px;
  169. cursor: text; }
  170. .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  171. box-sizing: border-box;
  172. list-style: none;
  173. margin: 0;
  174. padding: 0 5px;
  175. width: 100%; }
  176. .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
  177. list-style: none; }
  178. .select2-container--default .select2-selection--multiple .select2-selection__clear {
  179. cursor: pointer;
  180. float: right;
  181. font-weight: bold;
  182. margin-top: 5px;
  183. margin-right: 10px;
  184. padding: 1px; }
  185. .select2-container--default .select2-selection--multiple .select2-selection__choice {
  186. background-color: #e4e4e4;
  187. border: 1px solid #aaa;
  188. border-radius: 4px;
  189. cursor: default;
  190. float: left;
  191. margin-right: 5px;
  192. margin-top: 5px;
  193. padding: 0 5px; }
  194. .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  195. color: #999;
  196. cursor: pointer;
  197. display: inline-block;
  198. font-weight: bold;
  199. margin-right: 2px; }
  200. .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  201. color: #333; }
  202. .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
  203. float: right; }
  204. .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
  205. margin-left: 5px;
  206. margin-right: auto; }
  207. .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
  208. margin-left: 2px;
  209. margin-right: auto; }
  210. .select2-container--default.select2-container--focus .select2-selection--multiple {
  211. border: solid black 1px;
  212. outline: 0; }
  213. .select2-container--default.select2-container--disabled .select2-selection--multiple {
  214. background-color: #eee;
  215. cursor: default; }
  216. .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
  217. display: none; }
  218. .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
  219. border-top-left-radius: 0;
  220. border-top-right-radius: 0; }
  221. .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
  222. border-bottom-left-radius: 0;
  223. border-bottom-right-radius: 0; }
  224. .select2-container--default .select2-search--dropdown .select2-search__field {
  225. border: 1px solid #aaa; }
  226. .select2-container--default .select2-search--inline .select2-search__field {
  227. background: transparent;
  228. border: none;
  229. outline: 0;
  230. box-shadow: none;
  231. -webkit-appearance: textfield; }
  232. .select2-container--default .select2-results > .select2-results__options {
  233. max-height: 200px;
  234. overflow-y: auto; }
  235. .select2-container--default .select2-results__option[role=group] {
  236. padding: 0; }
  237. .select2-container--default .select2-results__option[aria-disabled=true] {
  238. color: #999; }
  239. .select2-container--default .select2-results__option[aria-selected=true] {
  240. background-color: #ddd; }
  241. .select2-container--default .select2-results__option .select2-results__option {
  242. padding-left: 1em; }
  243. .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
  244. padding-left: 0; }
  245. .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
  246. margin-left: -1em;
  247. padding-left: 2em; }
  248. .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
  249. margin-left: -2em;
  250. padding-left: 3em; }
  251. .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
  252. margin-left: -3em;
  253. padding-left: 4em; }
  254. .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
  255. margin-left: -4em;
  256. padding-left: 5em; }
  257. .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
  258. margin-left: -5em;
  259. padding-left: 6em; }
  260. .select2-container--default .select2-results__option--highlighted[aria-selected] {
  261. background-color: #5897fb;
  262. color: white; }
  263. .select2-container--default .select2-results__group {
  264. cursor: default;
  265. display: block;
  266. padding: 6px; }
  267. .select2-container--classic .select2-selection--single {
  268. background-color: #f7f7f7;
  269. border: 1px solid #aaa;
  270. border-radius: 4px;
  271. outline: 0;
  272. background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
  273. background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
  274. background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
  275. background-repeat: repeat-x;
  276. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
  277. .select2-container--classic .select2-selection--single:focus {
  278. border: 1px solid #5897fb; }
  279. .select2-container--classic .select2-selection--single .select2-selection__rendered {
  280. color: #444;
  281. line-height: 28px; }
  282. .select2-container--classic .select2-selection--single .select2-selection__clear {
  283. cursor: pointer;
  284. float: right;
  285. font-weight: bold;
  286. margin-right: 10px; }
  287. .select2-container--classic .select2-selection--single .select2-selection__placeholder {
  288. color: #999; }
  289. .select2-container--classic .select2-selection--single .select2-selection__arrow {
  290. background-color: #ddd;
  291. border: none;
  292. border-left: 1px solid #aaa;
  293. border-top-right-radius: 4px;
  294. border-bottom-right-radius: 4px;
  295. height: 26px;
  296. position: absolute;
  297. top: 1px;
  298. right: 1px;
  299. width: 20px;
  300. background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
  301. background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
  302. background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
  303. background-repeat: repeat-x;
  304. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
  305. .select2-container--classic .select2-selection--single .select2-selection__arrow b {
  306. border-color: #888 transparent transparent transparent;
  307. border-style: solid;
  308. border-width: 5px 4px 0 4px;
  309. height: 0;
  310. left: 50%;
  311. margin-left: -4px;
  312. margin-top: -2px;
  313. position: absolute;
  314. top: 50%;
  315. width: 0; }
  316. .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
  317. float: left; }
  318. .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
  319. border: none;
  320. border-right: 1px solid #aaa;
  321. border-radius: 0;
  322. border-top-left-radius: 4px;
  323. border-bottom-left-radius: 4px;
  324. left: 1px;
  325. right: auto; }
  326. .select2-container--classic.select2-container--open .select2-selection--single {
  327. border: 1px solid #5897fb; }
  328. .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
  329. background: transparent;
  330. border: none; }
  331. .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
  332. border-color: transparent transparent #888 transparent;
  333. border-width: 0 4px 5px 4px; }
  334. .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
  335. border-top: none;
  336. border-top-left-radius: 0;
  337. border-top-right-radius: 0;
  338. background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
  339. background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
  340. background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
  341. background-repeat: repeat-x;
  342. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
  343. .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
  344. border-bottom: none;
  345. border-bottom-left-radius: 0;
  346. border-bottom-right-radius: 0;
  347. background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
  348. background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
  349. background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
  350. background-repeat: repeat-x;
  351. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
  352. .select2-container--classic .select2-selection--multiple {
  353. background-color: white;
  354. border: 1px solid #aaa;
  355. border-radius: 4px;
  356. cursor: text;
  357. outline: 0; }
  358. .select2-container--classic .select2-selection--multiple:focus {
  359. border: 1px solid #5897fb; }
  360. .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
  361. list-style: none;
  362. margin: 0;
  363. padding: 0 5px; }
  364. .select2-container--classic .select2-selection--multiple .select2-selection__clear {
  365. display: none; }
  366. .select2-container--classic .select2-selection--multiple .select2-selection__choice {
  367. background-color: #e4e4e4;
  368. border: 1px solid #aaa;
  369. border-radius: 4px;
  370. cursor: default;
  371. float: left;
  372. margin-right: 5px;
  373. margin-top: 5px;
  374. padding: 0 5px; }
  375. .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
  376. color: #888;
  377. cursor: pointer;
  378. display: inline-block;
  379. font-weight: bold;
  380. margin-right: 2px; }
  381. .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
  382. color: #555; }
  383. .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
  384. float: right;
  385. margin-left: 5px;
  386. margin-right: auto; }
  387. .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
  388. margin-left: 2px;
  389. margin-right: auto; }
  390. .select2-container--classic.select2-container--open .select2-selection--multiple {
  391. border: 1px solid #5897fb; }
  392. .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
  393. border-top: none;
  394. border-top-left-radius: 0;
  395. border-top-right-radius: 0; }
  396. .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
  397. border-bottom: none;
  398. border-bottom-left-radius: 0;
  399. border-bottom-right-radius: 0; }
  400. .select2-container--classic .select2-search--dropdown .select2-search__field {
  401. border: 1px solid #aaa;
  402. outline: 0; }
  403. .select2-container--classic .select2-search--inline .select2-search__field {
  404. outline: 0;
  405. box-shadow: none; }
  406. .select2-container--classic .select2-dropdown {
  407. background-color: white;
  408. border: 1px solid transparent; }
  409. .select2-container--classic .select2-dropdown--above {
  410. border-bottom: none; }
  411. .select2-container--classic .select2-dropdown--below {
  412. border-top: none; }
  413. .select2-container--classic .select2-results > .select2-results__options {
  414. max-height: 200px;
  415. overflow-y: auto; }
  416. .select2-container--classic .select2-results__option[role=group] {
  417. padding: 0; }
  418. .select2-container--classic .select2-results__option[aria-disabled=true] {
  419. color: grey; }
  420. .select2-container--classic .select2-results__option--highlighted[aria-selected] {
  421. background-color: #3875d7;
  422. color: white; }
  423. .select2-container--classic .select2-results__group {
  424. cursor: default;
  425. display: block;
  426. padding: 6px; }
  427. .select2-container--classic.select2-container--open .select2-dropdown {
  428. border-color: #5897fb; }