controls.scss 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. .msp-row {
  2. position: relative;
  3. height: $row-height;
  4. background: $default-background;
  5. margin-top: 1px;
  6. select, button, input[type=text] {
  7. @extend .msp-form-control;
  8. }
  9. button {
  10. @extend .msp-btn;
  11. @extend .msp-btn-block;
  12. }
  13. }
  14. .msp-control-row {
  15. position: relative;
  16. height: $row-height;
  17. background: $default-background;
  18. margin-top: 1px;
  19. > span {
  20. line-height: $row-height;
  21. display: block;
  22. width: $control-label-width + $control-spacing;
  23. text-align: right;
  24. padding: 0 $control-spacing;
  25. color: color-lower-contrast($font-color, 15%);
  26. overflow: hidden;
  27. text-overflow: ellipsis;
  28. white-space: nowrap;
  29. @include non-selectable;
  30. }
  31. select, button, input[type=text] {
  32. @extend .msp-form-control;
  33. }
  34. button {
  35. @extend .msp-btn;
  36. @extend .msp-btn-block;
  37. }
  38. > div:nth-child(2) {
  39. background: $msp-form-control-background;
  40. position: absolute;
  41. left: $control-label-width + $control-spacing;
  42. top: 0;
  43. right: 0;
  44. bottom: 0;
  45. }
  46. }
  47. .msp-control-label-short {
  48. > span {
  49. width: $control-label-short-width + $control-spacing;
  50. }
  51. > div:nth-child(2) {
  52. left: $control-label-short-width + $control-spacing;
  53. }
  54. }
  55. .msp-control-col-2 {
  56. float: left;
  57. width: 50%;
  58. }
  59. .msp-control-group {
  60. position: relative;
  61. }
  62. .msp-toggle-button {
  63. .msp-icon {
  64. display: inline-block;
  65. margin-right: 6px;
  66. }
  67. > div > button:hover {
  68. border-color: color-increase-contrast($msp-form-control-background, 5%) !important;
  69. border: none;
  70. outline-offset: -1px !important;
  71. outline: 1px solid color-increase-contrast($msp-form-control-background, 20%) !important;
  72. }
  73. }
  74. .msp-slider {
  75. > div:first-child {
  76. position: absolute;
  77. top: 0;
  78. left: 18px;
  79. bottom: 0;
  80. right: 62px;
  81. display: grid;
  82. }
  83. > div:last-child {
  84. position: absolute;
  85. height: $row-height;
  86. line-height: $row-height;
  87. text-align: center;
  88. right: 0;
  89. width: 50px;
  90. top: 0;
  91. bottom: 0;
  92. }
  93. input[type=text] {
  94. padding-right: 6px;
  95. padding-left: 4px;
  96. font-size: 80%;
  97. text-align: right;
  98. }
  99. // input[type=range] {
  100. // width: 100%;
  101. // }
  102. }
  103. .msp-slider2 {
  104. > div:first-child {
  105. position: absolute;
  106. height: $row-height;
  107. line-height: $row-height;
  108. text-align: center;
  109. left: 0;
  110. width: 25px;
  111. top: 0;
  112. bottom: 0;
  113. font-size: 80%;
  114. }
  115. > div:nth-child(2) {
  116. position: absolute;
  117. top: 0;
  118. left: 35px;
  119. bottom: 0;
  120. right: 37px;
  121. display: grid;
  122. }
  123. > div:last-child {
  124. position: absolute;
  125. height: $row-height;
  126. line-height: $row-height;
  127. text-align: center;
  128. right: 0;
  129. width: 25px;
  130. top: 0;
  131. bottom: 0;
  132. font-size: 80%;
  133. }
  134. input[type=text] {
  135. padding-right: 4px;
  136. padding-left: 4px;
  137. font-size: 80%;
  138. text-align: center;
  139. }
  140. // input[type=range] {
  141. // width: 100%;
  142. // }
  143. }
  144. .msp-toggle-color-picker {
  145. button {
  146. border: $control-spacing solid $msp-form-control-background !important;
  147. margin: 0;
  148. text-align: center;
  149. padding-right: $control-spacing;
  150. padding-left: $control-spacing;
  151. &:hover {
  152. border-color: color-increase-contrast($msp-form-control-background, 5%) !important;
  153. border: none;
  154. outline-offset: -1px !important;
  155. outline: 1px solid color-increase-contrast($msp-form-control-background, 20%) !important;
  156. }
  157. }
  158. .msp-color-picker {
  159. position: absolute;
  160. z-index: 100000;
  161. background: $default-background;
  162. border-top: 1px solid $default-background;
  163. padding-bottom: $control-spacing / 2;
  164. width: 100%;
  165. // input[type=text] {
  166. // background: $msp-form-control-background !important;
  167. // }
  168. }
  169. }
  170. .msp-toggle-color-picker-above {
  171. .msp-color-picker {
  172. top: -2 * 32px - 16px - $control-spacing / 2;
  173. height: 2 * 32px + 16px + $control-spacing / 2;
  174. }
  175. }
  176. .msp-toggle-color-picker-below {
  177. .msp-color-picker {
  178. top: $row-height;
  179. height: 2 * 32px + 16px;
  180. }
  181. }
  182. .msp-control-offset {
  183. // border-left-width: $control-spacing / 2;
  184. // border-left-style: solid;
  185. // border-left-color: color-increase-contrast($default-background, 10%);
  186. // padding-left: 1px;
  187. padding-left: $control-spacing;
  188. }
  189. .msp-control-group-wrapper {
  190. //border-left-width: $control-spacing / 2;
  191. //border-left-style: solid;
  192. //border-left-color: color-increase-contrast($default-background, 10%);
  193. margin-bottom: 0px;
  194. padding-top: 1px;
  195. }
  196. // TODO : get rid of the important
  197. .msp-control-group-header {
  198. > button {
  199. padding-left: $control-spacing / 2 !important;
  200. text-align: left !important;
  201. height: 2 * $row-height / 3 !important;
  202. line-height: 2 * $row-height / 3 !important;
  203. font-size: 70% !important;
  204. background: $default-background !important;
  205. color: color-lower-contrast($font-color, 15%) !important;
  206. }
  207. }
  208. .msp-control-group-footer {
  209. background: color-increase-contrast($default-background, 5%);
  210. height: $control-spacing / 2;
  211. font-size: 1px;
  212. margin-top: 1px;
  213. }
  214. .msp-control-subgroup {
  215. margin-top: 1px;
  216. .msp-control-row {
  217. margin-left: $control-spacing !important;
  218. > span {
  219. width: $control-label-width !important;
  220. }
  221. > div:nth-child(2) {
  222. left: $control-label-width !important;
  223. }
  224. }
  225. }
  226. .msp-conrol-group-expander {
  227. display: block;
  228. position: absolute;
  229. line-height: $row-height;
  230. padding: 0;
  231. left: 0;
  232. top: 0;
  233. width: $control-label-width + $control-spacing;
  234. text-align: left;
  235. background: transparent;
  236. .msp-icon {
  237. line-height: $row-height - 3;
  238. width: $row-height - 1;
  239. text-align: center;
  240. // display: inline-block;
  241. font-size: 100%;
  242. }
  243. }
  244. .msp-plugin-layout_controls {
  245. position: absolute;
  246. left: $control-spacing;
  247. top: $control-spacing;
  248. }
  249. .msp-plugin-layout_controls > button:first-child {
  250. margin-right: 6px;
  251. }
  252. .msp-empty-control {
  253. display: none;
  254. }
  255. .msp-control .msp-btn-block {
  256. margin-bottom: 0px;
  257. margin-top: 0px;
  258. }
  259. .msp-row-text {
  260. > div {
  261. line-height: $row-height;
  262. text-align: center;
  263. color: color-lower-contrast($font-color, 15%);
  264. }
  265. }
  266. .msp-help span {
  267. display: none;
  268. }
  269. .msp-help:hover span {
  270. display: inline-block;
  271. background: linear-gradient($default-background, change-color($default-background, $alpha: 0.5));
  272. }
  273. .msp-help-text {
  274. height: auto !important;
  275. > div {
  276. padding: ($control-spacing / 2) $control-spacing;
  277. text-align: left;
  278. color: color-lower-contrast($font-color, 15%);
  279. }
  280. }
  281. .msp-help-description {
  282. font-style: italic;
  283. }
  284. .msp-help-legend {
  285. padding-top: $control-spacing;
  286. }
  287. .msp-scale-legend {
  288. > div {
  289. width: 100%;
  290. height: $control-spacing * 3;
  291. > span {
  292. padding: $control-spacing / 2;
  293. color: white;
  294. font-weight: bold;
  295. background-color: rgba(0, 0, 0, 0.2);
  296. }
  297. }
  298. }
  299. .msp-table-legend {
  300. > div {
  301. // min-width: 60px;
  302. margin-right: $control-spacing / 2;
  303. display: inline-flex;
  304. .msp-table-legend-color {
  305. width: $control-spacing * 3;
  306. height: $control-spacing * 2;
  307. }
  308. .msp-table-legend-text {
  309. margin: 0 ($control-spacing / 2);
  310. }
  311. }
  312. }