chosen.css 14 KB

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