Nenhuma descrição

bootstrap-select.less 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. @import "variables";
  2. // Mixins
  3. .cursor-disabled() {
  4. cursor: not-allowed;
  5. }
  6. // Rules
  7. select.bs-select-hidden,
  8. select.selectpicker {
  9. display: none !important;
  10. }
  11. .bootstrap-select {
  12. width: 220px \0; /*IE9 and below*/
  13. // The selectpicker button
  14. > .dropdown-toggle {
  15. width: 100%;
  16. padding-right: 25px;
  17. z-index: 1;
  18. &.bs-placeholder,
  19. &.bs-placeholder:hover,
  20. &.bs-placeholder:focus,
  21. &.bs-placeholder:active { color: @input-color-placeholder; }
  22. }
  23. > select {
  24. position: absolute !important;
  25. bottom: 0;
  26. left: 50%;
  27. display: block !important;
  28. width: 0.5px !important;
  29. height: 100% !important;
  30. padding: 0 !important;
  31. opacity: 0 !important;
  32. border: none;
  33. &.mobile-device {
  34. top: 0;
  35. left: 0;
  36. display: block !important;
  37. width: 100% !important;
  38. z-index: 2;
  39. }
  40. }
  41. // Error display
  42. .has-error & .dropdown-toggle,
  43. .error & .dropdown-toggle {
  44. border-color: @color-red-error;
  45. }
  46. &.fit-width {
  47. width: auto !important;
  48. }
  49. &:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
  50. width: @width-default;
  51. }
  52. .dropdown-toggle:focus {
  53. outline: thin dotted #333333 !important;
  54. outline: 5px auto -webkit-focus-ring-color !important;
  55. outline-offset: -2px;
  56. }
  57. }
  58. .bootstrap-select.form-control {
  59. margin-bottom: 0;
  60. padding: 0;
  61. border: none;
  62. &:not([class*="col-"]) {
  63. width: 100%;
  64. }
  65. &.input-group-btn {
  66. z-index: auto;
  67. &:not(:first-child):not(:last-child) {
  68. > .btn {
  69. border-radius: 0;
  70. }
  71. }
  72. }
  73. }
  74. // The selectpicker components
  75. .bootstrap-select.btn-group {
  76. &:not(.input-group-btn),
  77. &[class*="col-"] {
  78. float: none;
  79. display: inline-block;
  80. margin-left: 0;
  81. }
  82. // Forces the pull to the right, if necessary
  83. &,
  84. &[class*="col-"],
  85. .row &[class*="col-"] {
  86. &.dropdown-menu-right {
  87. float: right;
  88. }
  89. }
  90. .form-inline &,
  91. .form-horizontal &,
  92. .form-group & {
  93. margin-bottom: 0;
  94. }
  95. .form-group-lg &.form-control,
  96. .form-group-sm &.form-control {
  97. padding: 0;
  98. .dropdown-toggle {
  99. height: 100%;
  100. font-size: inherit;
  101. line-height: inherit;
  102. border-radius: inherit;
  103. }
  104. }
  105. // Set the width of the live search (and any other form control within an inline form)
  106. // see https://github.com/silviomoreto/bootstrap-select/issues/685
  107. .form-inline & .form-control {
  108. width: 100%;
  109. }
  110. &.disabled,
  111. > .disabled {
  112. .cursor-disabled();
  113. &:focus {
  114. outline: none !important;
  115. }
  116. }
  117. &.bs-container {
  118. position: absolute;
  119. height: 0 !important;
  120. padding: 0 !important;
  121. .dropdown-menu {
  122. z-index: @zindex-select-dropdown;
  123. }
  124. }
  125. // The selectpicker button
  126. .dropdown-toggle {
  127. .filter-option {
  128. display: inline-block;
  129. overflow: hidden;
  130. width: 100%;
  131. text-align: left;
  132. }
  133. .caret {
  134. position: absolute;
  135. top: 50%;
  136. right: 12px;
  137. margin-top: -2px;
  138. vertical-align: middle;
  139. }
  140. }
  141. &[class*="col-"] .dropdown-toggle {
  142. width: 100%;
  143. }
  144. // The selectpicker dropdown
  145. .dropdown-menu {
  146. min-width: 100%;
  147. box-sizing: border-box;
  148. &.inner {
  149. position: static;
  150. float: none;
  151. border: 0;
  152. padding: 0;
  153. margin: 0;
  154. border-radius: 0;
  155. box-shadow: none;
  156. }
  157. li {
  158. position: relative;
  159. &.active small {
  160. color: #fff;
  161. }
  162. &.disabled a {
  163. .cursor-disabled();
  164. }
  165. a {
  166. cursor: pointer;
  167. user-select: none;
  168. &.opt {
  169. position: relative;
  170. padding-left: 2.25em;
  171. }
  172. span.check-mark {
  173. display: none;
  174. }
  175. span.text {
  176. display: inline-block;
  177. }
  178. }
  179. small {
  180. padding-left: 0.5em;
  181. }
  182. }
  183. .notify {
  184. position: absolute;
  185. bottom: 5px;
  186. width: 96%;
  187. margin: 0 2%;
  188. min-height: 26px;
  189. padding: 3px 5px;
  190. background: rgb(245, 245, 245);
  191. border: 1px solid rgb(227, 227, 227);
  192. box-shadow: inset 0 1px 1px fade(rgb(0, 0, 0), 5%);
  193. pointer-events: none;
  194. opacity: 0.9;
  195. box-sizing: border-box;
  196. }
  197. }
  198. .no-results {
  199. padding: 3px;
  200. background: #f5f5f5;
  201. margin: 0 5px;
  202. white-space: nowrap;
  203. }
  204. &.fit-width .dropdown-toggle {
  205. .filter-option {
  206. position: static;
  207. }
  208. .caret {
  209. position: static;
  210. top: auto;
  211. margin-top: -1px;
  212. }
  213. }
  214. &.show-tick .dropdown-menu li {
  215. &.selected a span.check-mark {
  216. position: absolute;
  217. display: inline-block;
  218. right: 15px;
  219. margin-top: 5px;
  220. }
  221. a span.text {
  222. margin-right: 34px;
  223. }
  224. }
  225. }
  226. .bootstrap-select.show-menu-arrow {
  227. &.open > .dropdown-toggle {
  228. z-index: (@zindex-select-dropdown + 1);
  229. }
  230. .dropdown-toggle {
  231. &:before {
  232. content: '';
  233. border-left: 7px solid transparent;
  234. border-right: 7px solid transparent;
  235. border-bottom: 7px solid @color-grey-arrow;
  236. position: absolute;
  237. bottom: -4px;
  238. left: 9px;
  239. display: none;
  240. }
  241. &:after {
  242. content: '';
  243. border-left: 6px solid transparent;
  244. border-right: 6px solid transparent;
  245. border-bottom: 6px solid white;
  246. position: absolute;
  247. bottom: -4px;
  248. left: 10px;
  249. display: none;
  250. }
  251. }
  252. &.dropup .dropdown-toggle {
  253. &:before {
  254. bottom: auto;
  255. top: -3px;
  256. border-top: 7px solid @color-grey-arrow;
  257. border-bottom: 0;
  258. }
  259. &:after {
  260. bottom: auto;
  261. top: -3px;
  262. border-top: 6px solid white;
  263. border-bottom: 0;
  264. }
  265. }
  266. &.pull-right .dropdown-toggle {
  267. &:before {
  268. right: 12px;
  269. left: auto;
  270. }
  271. &:after {
  272. right: 13px;
  273. left: auto;
  274. }
  275. }
  276. &.open > .dropdown-toggle {
  277. &:before,
  278. &:after {
  279. display: block;
  280. }
  281. }
  282. }
  283. .bs-searchbox,
  284. .bs-actionsbox,
  285. .bs-donebutton {
  286. padding: 4px 8px;
  287. }
  288. .bs-actionsbox {
  289. width: 100%;
  290. box-sizing: border-box;
  291. & .btn-group button {
  292. width: 50%;
  293. }
  294. }
  295. .bs-donebutton {
  296. float: left;
  297. width: 100%;
  298. box-sizing: border-box;
  299. & .btn-group button {
  300. width: 100%;
  301. }
  302. }
  303. .bs-searchbox {
  304. & + .bs-actionsbox {
  305. padding: 0 8px 4px;
  306. }
  307. & .form-control {
  308. margin-bottom: 0;
  309. width: 100%;
  310. float: none;
  311. }
  312. }