select2.css 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. /*
  2. Version: @@ver@@ Timestamp: @@timestamp@@
  3. */
  4. .select2-container {
  5. position: relative;
  6. display: inline-block;
  7. /* inline-block for ie7 */
  8. zoom: 1;
  9. *display: inline;
  10. vertical-align: top;
  11. }
  12. .select2-container,
  13. .select2-drop,
  14. .select2-search,
  15. .select2-search input{
  16. /*
  17. Force border-box so that % widths fit the parent
  18. container without overlap because of margin/padding.
  19. More Info : http://www.quirksmode.org/css/box.html
  20. */
  21. -moz-box-sizing: border-box; /* firefox */
  22. -ms-box-sizing: border-box; /* ie */
  23. -webkit-box-sizing: border-box; /* webkit */
  24. -khtml-box-sizing: border-box; /* konqueror */
  25. box-sizing: border-box; /* css3 */
  26. }
  27. .select2-container .select2-choice {
  28. background-color: #fff;
  29. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
  30. background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
  31. background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
  32. background-image: -o-linear-gradient(bottom, #eeeeee 0%, #ffffff 50%);
  33. background-image: -ms-linear-gradient(top, #eeeeee 0%, #ffffff 50%);
  34. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#ffffff', GradientType = 0);
  35. background-image: linear-gradient(top, #eeeeee 0%, #ffffff 50%);
  36. -webkit-border-radius: 4px;
  37. -moz-border-radius: 4px;
  38. border-radius: 4px;
  39. -moz-background-clip: padding;
  40. -webkit-background-clip: padding-box;
  41. background-clip: padding-box;
  42. border: 1px solid #aaa;
  43. display: block;
  44. overflow: hidden;
  45. white-space: nowrap;
  46. position: relative;
  47. height: 26px;
  48. line-height: 26px;
  49. padding: 0 0 0 8px;
  50. color: #444;
  51. text-decoration: none;
  52. }
  53. .select2-container.select2-drop-above .select2-choice
  54. {
  55. border-bottom-color: #aaa;
  56. -webkit-border-radius:0px 0px 4px 4px;
  57. -moz-border-radius:0px 0px 4px 4px;
  58. border-radius:0px 0px 4px 4px;
  59. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.9, white));
  60. background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 90%);
  61. background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 90%);
  62. background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 90%);
  63. background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 90%);
  64. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
  65. background-image: linear-gradient(top, #eeeeee 0%,#ffffff 90%);
  66. }
  67. .select2-container .select2-choice span {
  68. margin-right: 26px;
  69. display: block;
  70. overflow: hidden;
  71. white-space: nowrap;
  72. -o-text-overflow: ellipsis;
  73. -ms-text-overflow: ellipsis;
  74. text-overflow: ellipsis;
  75. }
  76. .select2-container .select2-choice abbr {
  77. display: block;
  78. position: absolute;
  79. right: 26px;
  80. top: 8px;
  81. width: 12px;
  82. height: 12px;
  83. font-size: 1px;
  84. background: url('select2.png') right top no-repeat;
  85. cursor: pointer;
  86. text-decoration: none;
  87. border:0;
  88. outline: 0;
  89. }
  90. .select2-container .select2-choice abbr:hover {
  91. background-position: right -11px;
  92. cursor: pointer;
  93. }
  94. .select2-drop {
  95. background: #fff;
  96. color: #000;
  97. border: 1px solid #aaa;
  98. border-top: 0;
  99. position: absolute;
  100. top: 100%;
  101. -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  102. -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  103. -o-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  104. box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  105. z-index: 9999;
  106. width:100%;
  107. margin-top:-1px;
  108. -webkit-border-radius: 0 0 4px 4px;
  109. -moz-border-radius: 0 0 4px 4px;
  110. border-radius: 0 0 4px 4px;
  111. }
  112. .select2-drop.select2-drop-above {
  113. -webkit-border-radius: 4px 4px 0px 0px;
  114. -moz-border-radius: 4px 4px 0px 0px;
  115. border-radius: 4px 4px 0px 0px;
  116. margin-top:1px;
  117. border-top: 1px solid #aaa;
  118. border-bottom: 0;
  119. -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
  120. -moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
  121. -o-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
  122. box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
  123. }
  124. .select2-container .select2-choice div {
  125. -webkit-border-radius: 0 4px 4px 0;
  126. -moz-border-radius: 0 4px 4px 0;
  127. border-radius: 0 4px 4px 0;
  128. -moz-background-clip: padding;
  129. -webkit-background-clip: padding-box;
  130. background-clip: padding-box;
  131. background: #ccc;
  132. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
  133. background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
  134. background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
  135. background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
  136. background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%);
  137. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#cccccc', endColorstr = '#eeeeee', GradientType = 0);
  138. background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
  139. border-left: 1px solid #aaa;
  140. position: absolute;
  141. right: 0;
  142. top: 0;
  143. display: block;
  144. height: 100%;
  145. width: 18px;
  146. }
  147. .select2-container .select2-choice div b {
  148. background: url('select2.png') no-repeat 0 1px;
  149. display: block;
  150. width: 100%;
  151. height: 100%;
  152. }
  153. .select2-search {
  154. display: inline-block;
  155. white-space: nowrap;
  156. z-index: 10000;
  157. position: relative;
  158. min-height: 26px;
  159. width: 100%;
  160. margin: 0;
  161. padding-left: 4px;
  162. padding-right: 4px;
  163. }
  164. .select2-search-hidden {
  165. display: block;
  166. position: absolute;
  167. left: -10000px;
  168. }
  169. .select2-search input {
  170. background: #fff url('select2.png') no-repeat 100% -22px;
  171. background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
  172. background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  173. background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  174. background: url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
  175. background: url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  176. background: url('select2.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  177. padding: 4px 20px 4px 5px;
  178. outline: 0;
  179. border: 1px solid #aaa;
  180. font-family: sans-serif;
  181. font-size: 1em;
  182. width:100%;
  183. margin:0;
  184. height:auto !important;
  185. min-height: 26px;
  186. -webkit-box-shadow: none;
  187. -moz-box-shadow: none;
  188. box-shadow: none;
  189. border-radius: 0;
  190. -moz-border-radius: 0;
  191. -webkit-border-radius: 0;
  192. }
  193. .select2-drop.select2-drop-above .select2-search input
  194. {
  195. margin-top:4px;
  196. }
  197. .select2-search input.select2-active {
  198. background: #fff url('spinner.gif') no-repeat 100%;
  199. background: url('spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
  200. background: url('spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  201. background: url('spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  202. background: url('spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
  203. background: url('spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  204. background: url('spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  205. }
  206. .select2-container-active .select2-choice,
  207. .select2-container-active .select2-choices {
  208. -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
  209. -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
  210. -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
  211. box-shadow : 0 0 5px rgba(0,0,0,.3);
  212. border: 1px solid #5897fb;
  213. outline: none;
  214. }
  215. .select2-dropdown-open .select2-choice {
  216. border: 1px solid #aaa;
  217. border-bottom-color: transparent;
  218. -webkit-box-shadow: 0 1px 0 #fff inset;
  219. -moz-box-shadow : 0 1px 0 #fff inset;
  220. -o-box-shadow : 0 1px 0 #fff inset;
  221. box-shadow : 0 1px 0 #fff inset;
  222. background-color: #eee;
  223. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
  224. background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
  225. background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
  226. background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
  227. background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
  228. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
  229. background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
  230. -webkit-border-bottom-left-radius : 0;
  231. -webkit-border-bottom-right-radius: 0;
  232. -moz-border-radius-bottomleft : 0;
  233. -moz-border-radius-bottomright: 0;
  234. border-bottom-left-radius : 0;
  235. border-bottom-right-radius: 0;
  236. }
  237. .select2-dropdown-open .select2-choice div {
  238. background: transparent;
  239. border-left: none;
  240. }
  241. .select2-dropdown-open .select2-choice div b {
  242. background-position: -18px 1px;
  243. }
  244. /* results */
  245. .select2-results {
  246. margin: 4px 4px 4px 0;
  247. padding: 0 0 0 4px;
  248. position: relative;
  249. overflow-x: hidden;
  250. overflow-y: auto;
  251. max-height: 200px;
  252. }
  253. .select2-results ul.select2-result-sub {
  254. margin: 0 0 0 0;
  255. }
  256. .select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
  257. .select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px }
  258. .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
  259. .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px }
  260. .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px }
  261. .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
  262. .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
  263. .select2-results li {
  264. list-style: none;
  265. display: list-item;
  266. }
  267. .select2-results li.select2-result-with-children > .select2-result-label {
  268. font-weight: bold;
  269. }
  270. .select2-results .select2-result-label {
  271. padding: 3px 7px 4px;
  272. margin: 0;
  273. cursor: pointer;
  274. }
  275. .select2-results .select2-highlighted {
  276. background: #3875d7;
  277. color: #fff;
  278. }
  279. .select2-results li em {
  280. background: #feffde;
  281. font-style: normal;
  282. }
  283. .select2-results .select2-highlighted em {
  284. background: transparent;
  285. }
  286. .select2-results .select2-no-results,
  287. .select2-results .select2-searching,
  288. .select2-results .select2-selection-limit {
  289. background: #f4f4f4;
  290. display: list-item;
  291. }
  292. /*
  293. disabled look for already selected choices in the results dropdown
  294. .select2-results .select2-disabled.select2-highlighted {
  295. color: #666;
  296. background: #f4f4f4;
  297. display: list-item;
  298. cursor: default;
  299. }
  300. .select2-results .select2-disabled {
  301. background: #f4f4f4;
  302. display: list-item;
  303. cursor: default;
  304. }
  305. */
  306. .select2-results .select2-disabled {
  307. display: none;
  308. }
  309. .select2-more-results.select2-active {
  310. background: #f4f4f4 url('spinner.gif') no-repeat 100%;
  311. }
  312. .select2-more-results {
  313. background: #f4f4f4;
  314. display: list-item;
  315. }
  316. /* disabled styles */
  317. .select2-container.select2-container-disabled .select2-choice {
  318. background-color: #f4f4f4;
  319. background-image: none;
  320. border: 1px solid #ddd;
  321. cursor: default;
  322. }
  323. .select2-container.select2-container-disabled .select2-choice div {
  324. background-color: #f4f4f4;
  325. background-image: none;
  326. border-left: 0;
  327. }
  328. .select2-container.select2-container-disabled .select2-choice abbr {
  329. display: none
  330. }
  331. /* multiselect */
  332. .select2-container-multi .select2-choices {
  333. background-color: #fff;
  334. background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
  335. background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  336. background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  337. background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  338. background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  339. background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  340. border: 1px solid #aaa;
  341. margin: 0;
  342. padding: 0;
  343. cursor: text;
  344. overflow: hidden;
  345. height: auto !important;
  346. height: 1%;
  347. position: relative;
  348. }
  349. .select2-container-multi .select2-choices {
  350. min-height: 26px;
  351. }
  352. .select2-container-multi.select2-container-active .select2-choices {
  353. -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
  354. -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
  355. -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
  356. box-shadow : 0 0 5px rgba(0,0,0,.3);
  357. border: 1px solid #5897fb;
  358. outline: none;
  359. }
  360. .select2-container-multi .select2-choices li {
  361. float: left;
  362. list-style: none;
  363. }
  364. .select2-container-multi .select2-choices .select2-search-field {
  365. white-space: nowrap;
  366. margin: 0;
  367. padding: 0;
  368. }
  369. .select2-container-multi .select2-choices .select2-search-field input {
  370. color: #666;
  371. background: transparent !important;
  372. font-family: sans-serif;
  373. font-size: 100%;
  374. height: 15px;
  375. padding: 5px;
  376. margin: 1px 0;
  377. outline: 0;
  378. border: 0;
  379. -webkit-box-shadow: none;
  380. -moz-box-shadow : none;
  381. -o-box-shadow : none;
  382. box-shadow : none;
  383. }
  384. .select2-container-multi .select2-choices .select2-search-field input.select2-active {
  385. background: #fff url('spinner.gif') no-repeat 100% !important;
  386. }
  387. .select2-default {
  388. color: #999 !important;
  389. }
  390. .select2-container-multi .select2-choices .select2-search-choice {
  391. -webkit-border-radius: 3px;
  392. -moz-border-radius : 3px;
  393. border-radius : 3px;
  394. -moz-background-clip : padding;
  395. -webkit-background-clip: padding-box;
  396. background-clip : padding-box;
  397. background-color: #e4e4e4;
  398. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
  399. background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
  400. background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  401. background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  402. background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  403. background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  404. background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  405. -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  406. -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  407. box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  408. color: #333;
  409. border: 1px solid #aaaaaa;
  410. line-height: 13px;
  411. padding: 3px 5px 3px 18px;
  412. margin: 3px 0 3px 5px;
  413. position: relative;
  414. cursor: default;
  415. }
  416. .select2-container-multi .select2-choices .select2-search-choice span {
  417. cursor: default;
  418. }
  419. .select2-container-multi .select2-choices .select2-search-choice-focus {
  420. background: #d4d4d4;
  421. }
  422. .select2-search-choice-close {
  423. display: block;
  424. position: absolute;
  425. right: 3px;
  426. top: 4px;
  427. width: 12px;
  428. height: 13px;
  429. font-size: 1px;
  430. background: url('select2.png') right top no-repeat;
  431. outline: none;
  432. }
  433. .select2-container-multi .select2-search-choice-close {
  434. left: 3px;
  435. }
  436. .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
  437. background-position: right -11px;
  438. }
  439. .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
  440. background-position: right -11px;
  441. }
  442. /* disabled styles */
  443. .select2-container-multi.select2-container-disabled .select2-choices{
  444. background-color: #f4f4f4;
  445. background-image: none;
  446. border: 1px solid #ddd;
  447. cursor: default;
  448. }
  449. .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
  450. background-image: none;
  451. background-color: #f4f4f4;
  452. border: 1px solid #ddd;
  453. padding: 3px 5px 3px 5px;
  454. }
  455. .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close {
  456. display: none;
  457. }
  458. /* end multiselect */
  459. .select2-result-selectable .select2-match,
  460. .select2-result-unselectable .select2-result-selectable .select2-match { text-decoration: underline; }
  461. .select2-result-unselectable .select2-match { text-decoration: none; }
  462. .select2-offscreen { position: absolute; left: -10000px; }
  463. /* Retina-ize icons */
  464. @media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
  465. .select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice div b {
  466. background-image: url(select2x2.png) !important;
  467. background-repeat: no-repeat !important;
  468. background-size: 60px 40px !important;
  469. }
  470. .select2-search input {
  471. background-position: 100% -21px !important;
  472. }
  473. }