controls.scss 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. .msp-control-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. > span.msp-control-row-label, > button.msp-control-button-label {
  14. line-height: $row-height;
  15. display: block;
  16. width: $control-label-width + $control-spacing;
  17. text-align: right;
  18. padding: 0 $control-spacing;
  19. color: color-lower-contrast($font-color, 15%);
  20. overflow: hidden;
  21. text-overflow: ellipsis;
  22. white-space: nowrap;
  23. position: relative;
  24. @include non-selectable;
  25. }
  26. > button.msp-control-button-label {
  27. background: $default-background;
  28. cursor: pointer;
  29. }
  30. .msp-control-current {
  31. background: $default-background;
  32. }
  33. > div.msp-control-row-ctrl {
  34. position: absolute;
  35. left: $control-label-width + $control-spacing;
  36. top: 0;
  37. right: 0;
  38. bottom: 0;
  39. }
  40. > div {
  41. background: $msp-form-control-background;
  42. }
  43. > .msp-flex-row {
  44. background: $default-background;
  45. }
  46. }
  47. .msp-control-label-short {
  48. > span {
  49. width: $control-label-short-width + $control-spacing !important;
  50. }
  51. > div:nth-child(2) {
  52. left: $control-label-short-width + $control-spacing !important;
  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-accent-offset {
  190. padding-left: 1px;
  191. margin-left: $control-spacing - 2;
  192. border-left: 2px solid $color-accent-orange;
  193. }
  194. // .msp-accent-offset-right {
  195. // margin-left: $control-spacing;
  196. // padding-right: 1px;
  197. // border-right: 2px solid $color-accent-orange;
  198. // }
  199. .msp-control-group-wrapper {
  200. //border-left-width: $control-spacing / 2;
  201. //border-left-style: solid;
  202. //border-left-color: color-increase-contrast($default-background, 10%);
  203. margin-bottom: 0px;
  204. margin-top: 1px;
  205. }
  206. // TODO : get rid of the important
  207. .msp-control-group-header {
  208. background: $default-background;
  209. > button, div {
  210. padding-left: 4px; // $control-spacing / 2 !important;
  211. text-align: left;
  212. height: 24px !important; // 2 * $row-height / 3 !important;
  213. line-height: 24px !important; // 2 * $row-height / 3 !important;
  214. font-size: 85% !important;
  215. background: $default-background !important;
  216. color: color-lower-contrast($font-color, 15%);
  217. }
  218. .msp-icon {
  219. height: 24px !important;
  220. line-height: 24px !important;
  221. }
  222. > span {
  223. padding-left: $control-spacing / 2;
  224. line-height: 2 * $row-height / 3;
  225. font-size: 70%;
  226. background: $default-background;
  227. color: color-lower-contrast($font-color, 15%);
  228. }
  229. }
  230. .msp-control-current {
  231. background: $default-background;
  232. }
  233. .msp-control-group-footer {
  234. background: color-increase-contrast($default-background, 5%);
  235. height: $control-spacing / 2;
  236. font-size: 1px;
  237. margin-top: 1px;
  238. }
  239. .msp-control-group-expander {
  240. display: block;
  241. position: absolute;
  242. line-height: $row-height;
  243. padding: 0;
  244. left: 0;
  245. top: 0;
  246. width: $control-label-width + $control-spacing;
  247. text-align: left;
  248. background: transparent;
  249. .msp-icon {
  250. line-height: $row-height - 3;
  251. width: $row-height - 1;
  252. text-align: center;
  253. // display: inline-block;
  254. font-size: 100%;
  255. }
  256. }
  257. .msp-plugin-layout_controls {
  258. position: absolute;
  259. left: $control-spacing;
  260. top: $control-spacing;
  261. }
  262. .msp-plugin-layout_controls > button:first-child {
  263. margin-right: 6px;
  264. }
  265. .msp-empty-control {
  266. display: none;
  267. }
  268. .msp-control .msp-btn-block {
  269. margin-bottom: 0px;
  270. margin-top: 0px;
  271. }
  272. .msp-row-text {
  273. height: $row-height;
  274. position: relative;
  275. background: $default-background;
  276. margin-top: 1px;
  277. > div {
  278. line-height: $row-height;
  279. text-align: center;
  280. color: color-lower-contrast($font-color, 15%);
  281. }
  282. }
  283. .msp-help span {
  284. display: none;
  285. }
  286. .msp-help:hover span {
  287. display: inline-block;
  288. background: linear-gradient($default-background, change-color($default-background, $alpha: 0.8));
  289. }
  290. .msp-help-text {
  291. position: relative;
  292. background: $default-background;
  293. margin-top: 1px;
  294. > div {
  295. padding: ($control-spacing / 2) $control-spacing;
  296. text-align: left;
  297. color: color-lower-contrast($font-color, 15%);
  298. }
  299. }
  300. .msp-help-description {
  301. font-style: italic;
  302. }
  303. .msp-help-legend {
  304. padding-top: $control-spacing;
  305. }
  306. .msp-scale-legend {
  307. > div {
  308. width: 100%;
  309. height: $control-spacing * 3;
  310. > span {
  311. padding: $control-spacing / 2;
  312. color: white;
  313. font-weight: bold;
  314. background-color: rgba(0, 0, 0, 0.2);
  315. }
  316. }
  317. }
  318. .msp-table-legend {
  319. > div {
  320. // min-width: 60px;
  321. margin-right: $control-spacing / 2;
  322. display: inline-flex;
  323. .msp-table-legend-color {
  324. width: $control-spacing * 3;
  325. height: $control-spacing * 2;
  326. }
  327. .msp-table-legend-text {
  328. margin: 0 ($control-spacing / 2);
  329. }
  330. }
  331. }
  332. .msp-image-preview {
  333. position: relative;
  334. background: $default-background;
  335. margin-top: 1px;
  336. padding: $control-spacing;
  337. canvas {
  338. @include user-select(none);
  339. }
  340. > span {
  341. margin-top: 6px;
  342. display: block;
  343. text-align: center;
  344. font-size: 80%;
  345. line-height: 15px;
  346. }
  347. }
  348. .msp-copy-image-wrapper {
  349. position: relative;
  350. div {
  351. font-weight: bold;
  352. padding: 3px;
  353. margin: 1px 0;
  354. width: 100%;
  355. background: $msp-form-control-background;
  356. text-align: center;
  357. }
  358. img {
  359. margin-top: 1px;
  360. }
  361. }