thirdparty-chosen.less 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. .enable_plugin_chosen() when(@enable-plugin-chosen = true) {
  2. .chosen-container + .help-inline {
  3. vertical-align:middle;
  4. }
  5. //chosen select boxes -- replace icons with FontAwesome
  6. /**
  7. .chosen-select {
  8. display: inline !important; //for validation plugin to work it must be displayed
  9. visibility: hidden;
  10. opacity: 0;
  11. position: absolute;
  12. z-index: -1;
  13. width: 0;
  14. height: 0;
  15. border-width: 0;
  16. }
  17. */
  18. .chosen-container , [class*="chosen-container"]{
  19. vertical-align: middle;
  20. > .chosen-single {
  21. line-height: 28px;
  22. height: 32px;
  23. box-shadow: none;
  24. background: #FAFAFA;
  25. }
  26. }
  27. .chosen-choices {
  28. box-shadow:none !important;
  29. }
  30. .chosen-container-single .chosen-single abbr {
  31. background: none;
  32. }
  33. .chosen-container-single .chosen-single abbr:after {
  34. content:"\f00d";
  35. display: inline-block;
  36. color:#888;
  37. font-family: FontAwesome;
  38. font-size: @base-font-size;
  39. position: absolute;
  40. right: 0;
  41. top: -7px;
  42. }
  43. .chosen-container-single .chosen-single abbr:hover:after {
  44. color:#464646;
  45. }
  46. .chosen-container-single.chosen-disabled .chosen-single abbr:hover:after {
  47. color:#464646;
  48. }
  49. .chosen-single div b {
  50. background: none !important;
  51. &:before {
  52. content: "\f0d7";
  53. display: inline-block;
  54. color: #888;
  55. font-family: FontAwesome;
  56. font-size: @base-font-size - 1;
  57. position: relative;
  58. top: -1px;
  59. left: 1px;
  60. }
  61. }
  62. .chosen-container-active.chosen-with-drop .chosen-single div b:before {
  63. content:"\f0d8";
  64. }
  65. .chosen-container-single {
  66. .chosen-search {
  67. position:relative;
  68. input[type="text"] {
  69. background:none;
  70. border-radius:0;
  71. line-height:28px;
  72. height:28px;
  73. }
  74. &:after{
  75. content:"\f002";
  76. display:inline-block;
  77. color: #888;
  78. font-family: FontAwesome;
  79. font-size: @base-font-size + 1;
  80. position:absolute;
  81. top:8px;
  82. right:12px;
  83. }
  84. }
  85. }
  86. .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
  87. height:25px;
  88. }
  89. .chosen-container-multi .chosen-choices li.search-choice {
  90. line-height: 16px;
  91. padding-bottom: 4px;
  92. }
  93. .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
  94. background:none;
  95. &:before {
  96. content:"\f00d";
  97. display: inline-block;
  98. color:#888;
  99. font-family:FontAwesome;
  100. font-size: @base-font-size;
  101. position: absolute;
  102. right: 2px;
  103. top: -1px;
  104. }
  105. &:hover {
  106. text-decoration:none;
  107. }
  108. &:hover:before {
  109. color:#464646;
  110. }
  111. }
  112. .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close:before {
  113. color:#464646;
  114. }
  115. .chosen-container .chosen-results-scroll-down ,
  116. .chosen-container .chosen-results-scroll-up {
  117. span {
  118. background: none;
  119. &:before{
  120. content: "\f0d7";
  121. display: inline-block;
  122. color: #888;
  123. font-family: FontAwesome;
  124. font-size: @base-font-size - 1;
  125. position: relative;
  126. top: -1px;
  127. left: 1px;
  128. }
  129. }
  130. }
  131. .chosen-container .chosen-results-scroll-up span:before {
  132. content:"\f0d8";
  133. }
  134. .chosen-container-active .chosen-single-with-drop div b:before {
  135. content:"\f0d8";
  136. }
  137. .chosen-rtl .chosen-search {
  138. input[type="text"] {
  139. background: none;
  140. }
  141. &:after {
  142. content:"";
  143. display:none;
  144. }
  145. &:before {
  146. content: "\f002";
  147. display: inline-block;
  148. color: #888;
  149. font-family: FontAwesome;
  150. font-size: @base-font-size + 1;
  151. position: absolute;
  152. top: 9px;
  153. left: 12px;
  154. }
  155. }
  156. /** chosen - etc */
  157. .chosen-container-single .chosen-single {
  158. border-radius:0;
  159. }
  160. .chosen-container .chosen-results li.highlighted {
  161. // background:#86BD6F;/* green */
  162. //background:#4492C9;/* blue1 */
  163. background:#316AC5;
  164. color: #FFF;
  165. }
  166. .chosen-container-single .chosen-drop {
  167. border-radius:0;
  168. border-bottom:3px solid #4492C9;
  169. border-color:#4492C9;
  170. }
  171. .chosen-single.chosen-single-with-drop , .chosen-container-active .chosen-single{
  172. border-color:#4492C9;
  173. }
  174. .chosen-single {
  175. .form-group.has-error & {
  176. border-color:@error-state-border !important;
  177. }
  178. .form-group.has-info & {
  179. border-color:@info-state-border !important;
  180. }
  181. .form-group.has-warning & {
  182. border-color:@warning-state-border !important;
  183. }
  184. .form-group.has-success & {
  185. border-color:@success-state-border !important;
  186. }
  187. }
  188. //.chosen-rtl .chosen-container-single-nosearch .chosen-search { left: -9999px; }
  189. //.chosen-rtl .chosen-drop { left: -9999px; }
  190. // .modal .chosen-rtl .chosen-container-single-nosearch .chosen-search { left: 9999px; }
  191. // .modal .chosen-rtl .chosen-drop { left: 9999px; }
  192. //.rtl .modal .chosen-container.chosen-with-drop .chosen-drop { left: auto; right: 0; }
  193. .chosen-container-active.chosen-with-drop .chosen-single {
  194. border-color:#4492C9;
  195. }
  196. .chosen-container .chosen-drop {
  197. display: none;
  198. }
  199. .chosen-container.chosen-with-drop .chosen-drop {
  200. left: auto;
  201. right: auto;
  202. display: block;
  203. }
  204. @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
  205. .chosen-rtl .chosen-search input[type="text"], .chosen-container-single .chosen-single abbr, .chosen-container-single .chosen-single div b, .chosen-container-single .chosen-search input[type="text"], .chosen-container-multi .chosen-choices li.search-choice .search-choice-close, .chosen-container .chosen-results-scroll-down span, .chosen-container .chosen-results-scroll-up span {
  206. background-image: none !important;
  207. background-repeat: no-repeat !important;
  208. background-size: auto !important;
  209. }
  210. }
  211. //a second style (like tag inpit)
  212. .enable_plugin_chosen_style_2() when(@enable-plugin-chosen-style-2 = true) {
  213. .tag-input-style + .chosen-container-multi {
  214. .chosen-choices li.search-choice {
  215. background-image:none;
  216. background-color:@tag-bg;
  217. color: #FFFFFF;
  218. display: inline-block;
  219. font-size: @base-font-size;
  220. font-weight: normal;
  221. margin-bottom: 3px;
  222. margin-right: 3px;
  223. padding: 6px 22px 7px 9px;
  224. position: relative;
  225. text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
  226. transition: all 0.2s ease 0s;
  227. vertical-align: baseline;
  228. white-space: nowrap;
  229. border:none;
  230. .box-shadow(none);
  231. .border-radius(0);
  232. .search-choice-close {
  233. position:absolute;
  234. top:0; bottom:0;
  235. right:0;
  236. width:18px;
  237. height:auto;
  238. line-height:25px;
  239. text-align:center;
  240. &:before {
  241. color:#FFF;
  242. position:static;
  243. font-size: @base-font-size - 2;
  244. }
  245. &:hover {
  246. background-color:rgba(0,0,0,0.2);
  247. &:before {
  248. color:#FFF;
  249. }
  250. }
  251. }
  252. }
  253. }
  254. .tag-input-style + .chosen-container-multi.chosen-rtl {
  255. .chosen-choices li.search-choice {
  256. padding: 6px 9px 7px 22px;
  257. margin-left: 0;
  258. margin-right:3px !important;//to override .RTL's
  259. .search-choice-close {
  260. right:auto;
  261. left:0;
  262. }
  263. }
  264. }
  265. }
  266. .enable_plugin_chosen_style_2();
  267. }
  268. .enable_plugin_chosen();