chosen.css 13 KB

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