chosen.css 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. /* @group Base */
  2. .chzn-container {
  3. /*font-size: 13px;*/
  4. position: relative;
  5. display: inline-block;
  6. vertical-align: middle;
  7. zoom: 1;
  8. *display: inline;
  9. }
  10. .chzn-container .chzn-drop {
  11. background: #fff;
  12. border: 1px solid #aaa;
  13. border-top: 0;
  14. position: absolute;
  15. top: 100%;
  16. left: -9999px;
  17. -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
  18. -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
  19. box-shadow : 0 4px 5px rgba(0,0,0,.15);
  20. z-index: 1010;
  21. width: 100%;
  22. -moz-box-sizing : border-box;
  23. -ms-box-sizing : border-box;
  24. -webkit-box-sizing: border-box;
  25. -khtml-box-sizing : border-box;
  26. box-sizing : border-box;
  27. }
  28. .chzn-container.chzn-with-drop .chzn-drop {
  29. left: 0;
  30. }
  31. /* @end */
  32. /* @group Single Chosen */
  33. .chzn-container-single .chzn-single {
  34. background-color: #ffffff;
  35. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 );
  36. background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
  37. background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
  38. background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
  39. background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
  40. background-image: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
  41. -webkit-border-radius: 3px;
  42. -moz-border-radius : 3px;
  43. border-radius : 3px;
  44. -moz-background-clip : padding;
  45. -webkit-background-clip: padding-box;
  46. background-clip : padding-box;
  47. /*border: 1px solid #aaaaaa;*/
  48. border: 1px solid #ccc;
  49. -webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
  50. -moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
  51. box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
  52. display: block;
  53. overflow: hidden;
  54. white-space: nowrap;
  55. position: relative;
  56. height: 23px;
  57. line-height: 24px;
  58. padding: 0 0 0 0;
  59. color: #444444;
  60. text-decoration: none;
  61. }
  62. .chzn-container-single .chzn-default {
  63. color: #999;
  64. }
  65. .chzn-container-single .chzn-single span {
  66. margin-right: 26px;
  67. display: block;
  68. overflow: hidden;
  69. white-space: nowrap;
  70. -o-text-overflow: ellipsis;
  71. -ms-text-overflow: ellipsis;
  72. text-overflow: ellipsis;
  73. }
  74. .chzn-container-single .chzn-single abbr {
  75. display: block;
  76. position: absolute;
  77. right: 26px;
  78. top: 6px;
  79. width: 12px;
  80. height: 12px;
  81. font-size: 1px;
  82. background: url('chosen-sprite.png') -42px 1px no-repeat;
  83. }
  84. .chzn-container-single .chzn-single abbr:hover {
  85. background-position: -42px -10px;
  86. }
  87. .chzn-container-single.chzn-disabled .chzn-single abbr:hover {
  88. background-position: -42px -10px;
  89. }
  90. .chzn-container-single .chzn-single div {
  91. position: absolute;
  92. right: 0;
  93. top: 0;
  94. display: block;
  95. height: 100%;
  96. width: 18px;
  97. }
  98. .chzn-container-single .chzn-single div b {
  99. background: url('chosen-sprite.png') no-repeat 0px 2px;
  100. display: block;
  101. width: 100%;
  102. height: 100%;
  103. }
  104. .chzn-container-single .chzn-search {
  105. padding: 3px 4px;
  106. position: relative;
  107. margin: 0;
  108. white-space: nowrap;
  109. z-index: 1010;
  110. }
  111. .chzn-container-single .chzn-search input {
  112. background: #fff url('chosen-sprite.png') no-repeat 100% -20px;
  113. background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
  114. background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  115. background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  116. background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  117. background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
  118. margin: 1px 0;
  119. padding: 4px 20px 4px 5px;
  120. outline: 0;
  121. border: 1px solid #aaa;
  122. font-family: sans-serif;
  123. font-size: 1em;
  124. width: 100%;
  125. -moz-box-sizing : border-box;
  126. -ms-box-sizing : border-box;
  127. -webkit-box-sizing: border-box;
  128. -khtml-box-sizing : border-box;
  129. box-sizing : border-box;
  130. }
  131. .chzn-container-single .chzn-drop {
  132. margin-top: -1px;
  133. -webkit-border-radius: 0 0 4px 4px;
  134. -moz-border-radius : 0 0 4px 4px;
  135. border-radius : 0 0 4px 4px;
  136. -moz-background-clip : padding;
  137. -webkit-background-clip: padding-box;
  138. background-clip : padding-box;
  139. }
  140. .chzn-container-single-nosearch .chzn-search {
  141. position: absolute;
  142. left: -9999px;
  143. }
  144. /* @end */
  145. /* @group Multi Chosen */
  146. .chzn-container-multi .chzn-choices {
  147. -webkit-border-radius: 4px;
  148. -moz-border-radius : 4px;
  149. border-radius : 4px;
  150. background-color: #fff;
  151. /*background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));*/
  152. /*background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);*/
  153. /*background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);*/
  154. /*background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);*/
  155. /*background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);*/
  156. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
  157. border: 1px solid #ccc;
  158. margin: 0;
  159. padding: 6px 12px;
  160. cursor: text;
  161. overflow: hidden;
  162. height: auto !important;
  163. height: 1%;
  164. position: relative;
  165. width: 100%;
  166. box-sizing : border-box;
  167. }
  168. .chzn-container-multi .chzn-choices li {
  169. float: left;
  170. list-style: none;
  171. }
  172. .chzn-container-multi .chzn-choices .search-field {
  173. white-space: nowrap;
  174. margin: 0;
  175. padding: 0;
  176. }
  177. .chzn-container-multi .chzn-choices .search-field input {
  178. color: #666;
  179. background: transparent !important;
  180. border: 0 !important;
  181. font-family: sans-serif;
  182. font-size: 100%;
  183. height: 15px;
  184. padding: 0;
  185. margin: 1px 0;
  186. outline: 0;
  187. -webkit-box-shadow: none;
  188. -moz-box-shadow : none;
  189. box-shadow : none;
  190. }
  191. .chzn-container-multi .chzn-choices .search-field .default {
  192. color: #999;
  193. }
  194. .chzn-container-multi .chzn-choices .search-choice {
  195. -webkit-border-radius: 3px;
  196. -moz-border-radius : 3px;
  197. border-radius : 3px;
  198. -moz-background-clip : padding;
  199. -webkit-background-clip: padding-box;
  200. background-clip : padding-box;
  201. background-color: #e4e4e4;
  202. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
  203. 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));
  204. background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  205. background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  206. background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  207. background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  208. -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  209. -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  210. box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  211. color: #333;
  212. /*border: 1px solid #aaaaaa;*/
  213. border: 1px solid #ccc;
  214. line-height: 13px;
  215. padding: 3px 20px 3px 5px;
  216. /*margin: 3px 0 3px 5px;*/
  217. margin: 3px 0 3px 0;
  218. position: relative;
  219. cursor: default;
  220. }
  221. .chzn-container-multi .chzn-choices .search-choice.search-choice-disabled {
  222. background-color: #e4e4e4;
  223. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
  224. 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));
  225. background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  226. background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  227. background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  228. background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  229. background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  230. color: #666;
  231. border: 1px solid #cccccc;
  232. padding-right: 5px;
  233. }
  234. .chzn-container-multi .chzn-choices .search-choice-focus {
  235. background: #d4d4d4;
  236. }
  237. .chzn-container-multi .chzn-choices .search-choice .search-choice-close {
  238. display: block;
  239. position: absolute;
  240. right: 3px;
  241. top: 4px;
  242. width: 12px;
  243. height: 12px;
  244. font-size: 1px;
  245. background: url('chosen-sprite.png') -42px 1px no-repeat;
  246. }
  247. .chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
  248. background-position: -42px -10px;
  249. }
  250. .chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
  251. background-position: -42px -10px;
  252. }
  253. /* @end */
  254. /* @group Results */
  255. .chzn-container .chzn-results {
  256. margin: 0 4px 4px 0;
  257. max-height: 240px;
  258. padding: 0 0 0 4px;
  259. position: relative;
  260. overflow-x: hidden;
  261. overflow-y: auto;
  262. -webkit-overflow-scrolling: touch;
  263. }
  264. .chzn-container-multi .chzn-results {
  265. margin: 0;
  266. padding: 0;
  267. }
  268. .chzn-container .chzn-results li {
  269. display: none;
  270. line-height: 15px;
  271. padding: 5px 6px;
  272. margin: 0;
  273. list-style: none;
  274. }
  275. .chzn-container .chzn-results .active-result {
  276. cursor: pointer;
  277. display: list-item;
  278. }
  279. .chzn-container .chzn-results .highlighted {
  280. background-color: #3875d7;
  281. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 );
  282. background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
  283. background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
  284. background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
  285. background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
  286. background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
  287. color: #fff;
  288. }
  289. .chzn-container .chzn-results li em {
  290. background: #feffde;
  291. font-style: normal;
  292. }
  293. .chzn-container .chzn-results .highlighted em {
  294. background: transparent;
  295. }
  296. .chzn-container .chzn-results .no-results {
  297. background: #f4f4f4;
  298. display: list-item;
  299. }
  300. .chzn-container .chzn-results .group-result {
  301. cursor: default;
  302. color: #999;
  303. font-weight: bold;
  304. }
  305. .chzn-container .chzn-results .group-option {
  306. padding-left: 15px;
  307. }
  308. .chzn-container-multi .chzn-drop .result-selected {
  309. display: none;
  310. }
  311. .chzn-container .chzn-results-scroll {
  312. background: white;
  313. margin: 0 4px;
  314. position: absolute;
  315. text-align: center;
  316. width: 321px; /* This should by dynamic with js */
  317. z-index: 1;
  318. }
  319. .chzn-container .chzn-results-scroll span {
  320. display: inline-block;
  321. height: 17px;
  322. text-indent: -5000px;
  323. width: 9px;
  324. }
  325. .chzn-container .chzn-results-scroll-down {
  326. bottom: 0;
  327. }
  328. .chzn-container .chzn-results-scroll-down span {
  329. background: url('chosen-sprite.png') no-repeat -4px -3px;
  330. }
  331. .chzn-container .chzn-results-scroll-up span {
  332. background: url('chosen-sprite.png') no-repeat -22px -3px;
  333. }
  334. /* @end */
  335. /* @group Active */
  336. .chzn-container-active .chzn-single {
  337. -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
  338. -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
  339. box-shadow : 0 0 5px rgba(0,0,0,.3);
  340. border: 1px solid #5897fb;
  341. }
  342. .chzn-container-active.chzn-with-drop .chzn-single {
  343. border: 1px solid #aaa;
  344. -webkit-box-shadow: 0 1px 0 #fff inset;
  345. -moz-box-shadow : 0 1px 0 #fff inset;
  346. box-shadow : 0 1px 0 #fff inset;
  347. background-color: #eee;
  348. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );
  349. background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
  350. background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
  351. background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
  352. background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
  353. background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
  354. -webkit-border-bottom-left-radius : 0;
  355. -webkit-border-bottom-right-radius: 0;
  356. -moz-border-radius-bottomleft : 0;
  357. -moz-border-radius-bottomright: 0;
  358. border-bottom-left-radius : 0;
  359. border-bottom-right-radius: 0;
  360. }
  361. .chzn-container-active.chzn-with-drop .chzn-single div {
  362. background: transparent;
  363. border-left: none;
  364. }
  365. .chzn-container-active.chzn-with-drop .chzn-single div b {
  366. background-position: -18px 2px;
  367. }
  368. .chzn-container-active .chzn-choices {
  369. /* -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
  370. -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
  371. box-shadow : 0 0 5px rgba(0,0,0,.3);
  372. border: 1px solid #5897fb;*/
  373. border-color: rgba(82, 168, 236, 0.8);
  374. outline: 0;
  375. outline: thin dotted \9;
  376. /* IE6-9 */
  377. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
  378. -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
  379. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
  380. }
  381. .chzn-container-active .chzn-choices .search-field input {
  382. color: #111 !important;
  383. }
  384. /* @end */
  385. /* @group Disabled Support */
  386. .chzn-disabled {
  387. cursor: default;
  388. opacity:0.5 !important;
  389. }
  390. .chzn-disabled .chzn-single {
  391. cursor: default;
  392. }
  393. .chzn-disabled .chzn-choices .search-choice .search-choice-close {
  394. cursor: default;
  395. }
  396. /* @group Right to Left */
  397. .chzn-rtl { text-align: right; }
  398. .chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
  399. .chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
  400. .chzn-rtl .chzn-single div { left: 3px; right: auto; }
  401. .chzn-rtl .chzn-single abbr {
  402. left: 26px;
  403. right: auto;
  404. }
  405. .chzn-rtl .chzn-choices .search-field input { direction: rtl; }
  406. .chzn-rtl .chzn-choices li { float: right; }
  407. .chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
  408. .chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; }
  409. .chzn-rtl .chzn-search { left: 9999px; }
  410. .chzn-rtl.chzn-with-drop .chzn-search { left: 0px; }
  411. .chzn-rtl .chzn-drop { left: 9999px; }
  412. .chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
  413. .chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
  414. .chzn-rtl.chzn-container-active.chzn-with-drop .chzn-single div { border-right: none; }
  415. .chzn-rtl .chzn-search input {
  416. background: #fff url('chosen-sprite.png') no-repeat -30px -20px;
  417. background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
  418. background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  419. background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  420. background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  421. background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
  422. padding: 4px 5px 4px 20px;
  423. direction: rtl;
  424. }
  425. .chzn-container-single.chzn-rtl .chzn-single div b {
  426. background-position: 6px 2px;
  427. }
  428. .chzn-container-single.chzn-rtl.chzn-with-drop .chzn-single div b {
  429. background-position: -12px 2px;
  430. }
  431. /* @end */
  432. /* @group Retina compatibility */
  433. @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
  434. .chzn-rtl .chzn-search input, .chzn-container-single .chzn-single abbr, .chzn-container-single .chzn-single div b, .chzn-container-single .chzn-search input, .chzn-container-multi .chzn-choices .search-choice .search-choice-close, .chzn-container .chzn-results-scroll-down span, .chzn-container .chzn-results-scroll-up span {
  435. background-image: url('chosen-sprite@2x.png') !important;
  436. background-repeat: no-repeat !important;
  437. background-size: 52px 37px !important;
  438. }
  439. }
  440. /* @end */