widgets.less 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. @import 'common.less';
  19. @undo-btn-margin: 10px;
  20. @combo-widget-width: 100px;
  21. @green: #6ebd45;
  22. @slider-light-grey: #e6e6e6;
  23. @slider-dark-grey: #aaaaaa;
  24. @slider-widget-border-color: #999;
  25. @slider-widget-width: 220px;
  26. @slider-widget-tooltip-background-color: @green;
  27. @slider-widget-selection-background-color: @slider-dark-grey;
  28. @slider-widget-body-height: 10px;
  29. @slider-widget-body-background-color: @slider-light-grey;
  30. @slider-widget-tick-height: 6px;
  31. @slider-widget-tick-width: 1px;
  32. @slider-widget-tick-background-color: @slider-dark-grey;
  33. @slider-widget-tick-label-color: @slider-dark-grey;
  34. @slider-widget-tooltip-background: @slider-widget-tooltip-background-color;
  35. @slider-widget-disabled-selection-background-color: lighten(@slider-widget-selection-background-color, 20%);
  36. @widget-config-override-action-color: #cbcbcb;
  37. @widget-config-override-action-active-color: #acacac;
  38. @toggle-widget-handle-background-color: #f3f3f3;
  39. @toggle-widget-text-color: #fff;
  40. @toggle-widget-text-size: 12px;
  41. @toggle-widget-on-background-color: #aaa;
  42. @toggle-widget-off-background-color: @green;
  43. .widget-config {
  44. margin-bottom: 11px;
  45. .widget-config-label {
  46. font-size: 90%;
  47. width: 100%;
  48. &.text-success {
  49. color: @green;
  50. }
  51. .icon-warning-sign {
  52. &.warning {
  53. color: @health-status-yellow
  54. }
  55. }
  56. }
  57. .action-button {
  58. margin-right: @undo-btn-margin;
  59. }
  60. .widget-config-controls {
  61. float: right;
  62. display: inline-block;
  63. margin-left: 10px;
  64. min-height: 65px;
  65. min-width: 39px;
  66. &.version-labels {
  67. min-width: 52px;
  68. .label-current {
  69. padding: 2px 3px 3px 5px;
  70. }
  71. }
  72. .widget-col {
  73. width: 18px;
  74. &.left {
  75. float: left;
  76. }
  77. &.right {
  78. float: right;
  79. }
  80. }
  81. .widget-action {
  82. text-decoration: none;
  83. //display: block;
  84. }
  85. .widget-action-set-recommended,
  86. .widget-action-final,
  87. .widget-action-switch-view {
  88. padding-left: 1px;
  89. color: @widget-config-override-action-color;
  90. &.active {
  91. color: @widget-config-override-action-active-color;
  92. }
  93. &.text-error {
  94. color: #b94a48;
  95. }
  96. }
  97. }
  98. }
  99. .directory-textarea-wrapper {
  100. float: left;
  101. width: 80%;
  102. }
  103. .list-widget {
  104. li, li:active {
  105. a, a:hover, a:focus, a:active, a:visited {
  106. background-color: #fff !important;
  107. background-image: none !important;
  108. color: #333 !important;
  109. }
  110. }
  111. }
  112. .slider-widget {
  113. .widget-config-label {
  114. display: inline-block;
  115. padding-bottom: 13px;
  116. margin-bottom: 15px;
  117. }
  118. .slider-track {
  119. height: @slider-widget-body-height !important;
  120. border-radius: 0;
  121. .slider-track-high {
  122. background-color: @slider-widget-body-background-color;
  123. border-radius: 0;
  124. }
  125. }
  126. .slider.slider-horizontal {
  127. width: @slider-widget-width;
  128. .tooltip {
  129. margin-top: -24px;
  130. opacity: 1;
  131. font-size: 10px;
  132. line-height: 14px;
  133. min-width: 30px;
  134. z-index: 1;
  135. visibility: inherit;
  136. &.tooltip-min,
  137. &.tooltip-max {
  138. display: none;
  139. }
  140. .tooltip-inner {
  141. padding: 0px 2px;
  142. background-color: @slider-widget-tooltip-background-color;
  143. text-align: center;
  144. }
  145. .tooltip-arrow {
  146. bottom: 2px;
  147. margin-left: -4px;
  148. border-top-color: @slider-widget-tooltip-background-color;
  149. border-width: 4px 4px 0;
  150. }
  151. }
  152. .slider-tick {
  153. width: 0px;
  154. margin-top: 10px;
  155. margin-left: 0px;
  156. font-size: 8px;
  157. &:before,
  158. &.in-selection:before {
  159. content: '';
  160. display: block;
  161. width: 1px;
  162. height: 8px;
  163. background-color: @slider-widget-tick-background-color;
  164. }
  165. &.last {
  166. margin-left: -1px;
  167. }
  168. &.slider-tick-default {
  169. width: 0;
  170. height: 0;
  171. border-left: 5px solid transparent;
  172. border-right: 5px solid transparent;
  173. border-bottom: 5px solid @slider-dark-grey;
  174. margin-left: -5px;
  175. > span {
  176. color: @slider-widget-tick-label-color;
  177. font-size: 10px;
  178. }
  179. &::before {
  180. display: none;
  181. }
  182. }
  183. }
  184. &.slider-disabled {
  185. .tooltip-arrow {
  186. border-top-color: lighten(@green, 20%);;
  187. }
  188. .tooltip-inner {
  189. background-color: lighten(@green, 20%);;
  190. }
  191. }
  192. }
  193. .slider-handle {
  194. margin-top: -4px !important;
  195. height: 14px;
  196. width: 3px;
  197. margin-left: -1px !important;
  198. background-color: @slider-widget-selection-background-color;
  199. background-image: none;
  200. border-radius: 0;
  201. }
  202. .slider-tick-label-container {
  203. margin-top: 0;
  204. }
  205. .slider-tick-label {
  206. color: @slider-widget-tick-label-color;
  207. font-size: 10px;
  208. .slider-tick-reset-label {
  209. color: @slider-widget-tick-label-color;
  210. margin-left: 6px;
  211. }
  212. }
  213. .slider-selection {
  214. background-image: none;
  215. background-color: @slider-widget-selection-background-color;
  216. border-radius: 0;
  217. box-shadow: none;
  218. }
  219. .ui-slider-wrapper {
  220. .ui-slider-wrapper-inner {
  221. width: 68%;
  222. padding-left: 10px;
  223. .slider.slider-horizontal {
  224. width: 100%;
  225. }
  226. }
  227. .ui-slider-label {
  228. color: #aaa;
  229. line-height: 35px;
  230. }
  231. }
  232. .overrideField {
  233. margin-top: 30px;
  234. }
  235. }
  236. .slider-disabled {
  237. .slider-track-high {
  238. background-color: @slider-widget-disabled-selection-background-color;
  239. border-bottom-right-radius: 12px;
  240. border-top-right-radius: 12px;
  241. }
  242. .slider-selection {
  243. background-color: @slider-widget-disabled-selection-background-color;
  244. }
  245. .slider-track {
  246. div.slider-handle {
  247. background-image: none;
  248. background-color: @slider-widget-disabled-selection-background-color;
  249. }
  250. }
  251. }
  252. .spinner-input-widget {
  253. .spinner-input {
  254. display: inline-block;
  255. padding: 0 5px;
  256. line-height: normal;
  257. float: left;
  258. .input-append.input-prepend {
  259. margin: 0;
  260. }
  261. input {
  262. width: 20px;
  263. font-size: 12px;
  264. text-align: center;
  265. }
  266. .btn {
  267. &:first-child {
  268. padding-left: 4px;
  269. padding-right: 2px;
  270. }
  271. &:last-child {
  272. padding-left: 2px;
  273. padding-right: 4px;
  274. }
  275. }
  276. .spinner-input-label {
  277. font-size: 11px;
  278. }
  279. }
  280. .undo-button {
  281. padding: 2px 10px;
  282. float: left;
  283. }
  284. }
  285. .toggle-widget {
  286. .undo-button {
  287. margin-left: @undo-btn-margin;
  288. }
  289. .bootstrap-switch {
  290. &,
  291. &.bootstrap-switch-focused {
  292. border-color: transparent;
  293. box-shadow: none;
  294. }
  295. .bootstrap-switch-label {
  296. background-color: @toggle-widget-handle-background-color;
  297. background-image: none;
  298. text-shadow: none;
  299. border-width: 0;
  300. padding: 2px 8px;
  301. border-left: 1px solid transparent;
  302. border-right: 1px solid transparent;
  303. border-bottom: 1px solid @toggle-widget-handle-background-color;
  304. }
  305. .bootstrap-switch-handle-on,
  306. .bootstrap-switch-handle-off {
  307. color: @toggle-widget-text-color;
  308. font-size: @toggle-widget-text-size;
  309. background-image: none;
  310. text-shadow: none;
  311. border: none;
  312. padding: 2px 0;
  313. &:hover {
  314. text-shadow: none;
  315. color: @toggle-widget-text-color;
  316. }
  317. &.bootstrap-switch-default {
  318. background-color: @toggle-widget-on-background-color;
  319. }
  320. &.bootstrap-switch-success {
  321. background-color: @toggle-widget-off-background-color;
  322. }
  323. }
  324. }
  325. }
  326. .combo-widget {
  327. .input-append {
  328. .btn-group {
  329. display: inline-block;
  330. margin-left: -1px;
  331. > input {
  332. border-radius: 3px 0 0 3px;
  333. width: @combo-widget-width;
  334. &[disabled] {
  335. background: #fff;
  336. cursor: default;
  337. }
  338. }
  339. .btn {
  340. border-radius: 0 3px 3px 0;
  341. }
  342. }
  343. ul.dropdown-menu {
  344. z-index: 1100; // menu-items shouldn't be under popover
  345. }
  346. }
  347. .disabled {
  348. .dropdown {
  349. input[type="text"] {
  350. background-color: #eee;
  351. }
  352. }
  353. }
  354. .action-button {
  355. margin-left: @undo-btn-margin;
  356. }
  357. }
  358. .checkbox-widget {
  359. .widget-config-label {
  360. margin-left: 10px;
  361. width: auto;
  362. }
  363. .bootstrap-checkbox {
  364. &>button.btn {
  365. padding: 0;
  366. margin-top: -7px;
  367. color: @green;
  368. &:focus {
  369. border-color: none;
  370. box-shadow: 0;
  371. outline: 0 none;
  372. }
  373. }
  374. .icon-check-empty {
  375. margin-left: -3px;
  376. }
  377. }
  378. }
  379. .text-field-widget {
  380. .text-field-wrapper {
  381. width: 70%;
  382. float: left;
  383. }
  384. }
  385. .label-current.icon-ok {
  386. color: white;
  387. }
  388. .compare-mode {
  389. background-color: rgba(211, 237, 247, 0.39);
  390. padding: 10px 5px 0px 10px;
  391. }