chosen.css 14 KB

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