3837b326f569e0f55c8e44e3be3119f5c8817042cabd7cd3233e6f1c90b21aec8af5ad8ba2cb963d22da858c8b11060479123feaf47db29dc8bb1de1c4e96b 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. @import "mixins/mixins";
  2. @import "common/var";
  3. @include b(color-predefine) {
  4. display: flex;
  5. font-size: 12px;
  6. margin-top: 8px;
  7. width: 280px;
  8. @include e(colors) {
  9. display: flex;
  10. flex: 1;
  11. flex-wrap: wrap;
  12. }
  13. @include e(color-selector) {
  14. margin: 0 0 8px 8px;
  15. width: 20px;
  16. height: 20px;
  17. border-radius: 4px;
  18. cursor: pointer;
  19. &:nth-child(10n + 1) {
  20. margin-left: 0;
  21. }
  22. &.selected {
  23. box-shadow: 0 0 3px 2px $--color-primary;
  24. }
  25. > div {
  26. display: flex;
  27. height: 100%;
  28. border-radius: 3px;
  29. }
  30. @include when(alpha) {
  31. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
  32. }
  33. }
  34. }
  35. @include b(color-hue-slider) {
  36. position: relative;
  37. box-sizing: border-box;
  38. width: 280px;
  39. height: 12px;
  40. background-color: #f00;
  41. padding: 0 2px;
  42. @include e(bar) {
  43. position: relative;
  44. background: linear-gradient(
  45. to right, #f00 0%,
  46. #ff0 17%, #0f0 33%,
  47. #0ff 50%, #00f 67%,
  48. #f0f 83%, #f00 100%);
  49. height: 100%;
  50. }
  51. @include e(thumb) {
  52. position: absolute;
  53. cursor: pointer;
  54. box-sizing: border-box;
  55. left: 0;
  56. top: 0;
  57. width: 4px;
  58. height: 100%;
  59. border-radius: 1px;
  60. background: #fff;
  61. border: 1px solid #f0f0f0;
  62. box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
  63. z-index: 1;
  64. }
  65. @include when(vertical) {
  66. width: 12px;
  67. height: 180px;
  68. padding: 2px 0;
  69. .el-color-hue-slider__bar {
  70. background: linear-gradient(
  71. to bottom, #f00 0%,
  72. #ff0 17%, #0f0 33%,
  73. #0ff 50%, #00f 67%,
  74. #f0f 83%, #f00 100%);
  75. }
  76. .el-color-hue-slider__thumb {
  77. left: 0;
  78. top: 0;
  79. width: 100%;
  80. height: 4px;
  81. }
  82. }
  83. }
  84. @include b(color-svpanel) {
  85. position: relative;
  86. width: 280px;
  87. height: 180px;
  88. @include e(('white', 'black')) {
  89. position: absolute;
  90. top: 0;
  91. left: 0;
  92. right: 0;
  93. bottom: 0;
  94. }
  95. @include e('white') {
  96. background: linear-gradient(to right, #fff, rgba(255,255,255,0));
  97. }
  98. @include e('black') {
  99. background: linear-gradient(to top, #000, rgba(0,0,0,0));
  100. }
  101. @include e(cursor) {
  102. position: absolute;
  103. > div {
  104. cursor: head;
  105. width: 4px;
  106. height: 4px;
  107. box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,0.3), 0 0 1px 2px rgba(0,0,0,0.4);
  108. border-radius: 50%;
  109. transform: translate(-2px, -2px);
  110. }
  111. }
  112. }
  113. @include b(color-alpha-slider) {
  114. position: relative;
  115. box-sizing: border-box;
  116. width: 280px;
  117. height: 12px;
  118. background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
  119. @include e(bar) {
  120. position: relative;
  121. background: linear-gradient(
  122. to right, rgba(255, 255, 255, 0) 0%,
  123. rgba(255, 255, 255, 1) 100%);
  124. height: 100%;
  125. }
  126. @include e(thumb) {
  127. position: absolute;
  128. cursor: pointer;
  129. box-sizing: border-box;
  130. left: 0;
  131. top: 0;
  132. width: 4px;
  133. height: 100%;
  134. border-radius: 1px;
  135. background: #fff;
  136. border: 1px solid #f0f0f0;
  137. box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
  138. z-index: 1;
  139. }
  140. @include when(vertical) {
  141. width: 20px;
  142. height: 180px;
  143. .el-color-alpha-slider__bar {
  144. background: linear-gradient(
  145. to bottom, rgba(255, 255, 255, 0) 0%,
  146. rgba(255, 255, 255, 1) 100%);
  147. }
  148. .el-color-alpha-slider__thumb {
  149. left: 0;
  150. top: 0;
  151. width: 100%;
  152. height: 4px;
  153. }
  154. }
  155. }
  156. @include b(color-dropdown) {
  157. width: 300px;
  158. @include e(main-wrapper) {
  159. margin-bottom: 6px;
  160. &::after {
  161. content: "";
  162. display: table;
  163. clear: both;
  164. }
  165. }
  166. @include e(btns) {
  167. margin-top: 6px;
  168. text-align: right;
  169. }
  170. @include e(value) {
  171. float: left;
  172. line-height: 26px;
  173. font-size: 12px;
  174. color: $--color-black;
  175. width: 160px;
  176. }
  177. @include e(btn) {
  178. border: 1px solid #dcdcdc;
  179. color: #333;
  180. line-height: 24px;
  181. border-radius: 2px;
  182. padding: 0 20px;
  183. cursor: pointer;
  184. background-color: transparent;
  185. outline: none;
  186. font-size: 12px;
  187. &[disabled] {
  188. color: #cccccc;
  189. cursor: not-allowed;
  190. }
  191. &:hover {
  192. color: $--color-primary;
  193. border-color: $--color-primary;
  194. }
  195. }
  196. @include e(link-btn) {
  197. cursor: pointer;
  198. color: $--color-primary;
  199. text-decoration: none;
  200. padding: 15px;
  201. font-size: 12px;
  202. &:hover {
  203. color: tint($--color-primary, $--button-hover-tint-percent);
  204. }
  205. }
  206. }
  207. @include b(color-picker) {
  208. display: inline-block;
  209. position: relative;
  210. line-height: normal;
  211. height: 40px;
  212. @include when(disabled) {
  213. .el-color-picker__trigger {
  214. cursor: not-allowed;
  215. }
  216. }
  217. @include m(medium) {
  218. height: 36px;
  219. .el-color-picker__trigger {
  220. height: 36px;
  221. width: 36px;
  222. }
  223. .el-color-picker__mask {
  224. height: 34px;
  225. width: 34px;
  226. }
  227. }
  228. @include m(small) {
  229. height: 32px;
  230. .el-color-picker__trigger {
  231. height: 32px;
  232. width: 32px;
  233. }
  234. .el-color-picker__mask {
  235. height: 30px;
  236. width: 30px;
  237. }
  238. .el-color-picker__icon,
  239. .el-color-picker__empty {
  240. transform: translate3d(-50%, -50%, 0) scale(0.8);
  241. }
  242. }
  243. @include m(mini) {
  244. height: 28px;
  245. .el-color-picker__trigger {
  246. height: 28px;
  247. width: 28px;
  248. }
  249. .el-color-picker__mask {
  250. height: 26px;
  251. width: 26px;
  252. }
  253. .el-color-picker__icon,
  254. .el-color-picker__empty {
  255. transform: translate3d(-50%, -50%, 0) scale(0.8);
  256. }
  257. }
  258. @include e(mask) {
  259. height: 38px;
  260. width: 38px;
  261. border-radius: 4px;
  262. position: absolute;
  263. top: 1px;
  264. left: 1px;
  265. z-index: 1;
  266. cursor: not-allowed;
  267. background-color: rgba(255, 255, 255, .7);
  268. }
  269. @include e(trigger) {
  270. display: inline-block;
  271. box-sizing: border-box;
  272. height: 40px;
  273. width: 40px;
  274. padding: 4px;
  275. border: 1px solid #e6e6e6;
  276. border-radius: 4px;
  277. font-size: 0;
  278. position: relative;
  279. cursor: pointer;
  280. }
  281. @include e(color) {
  282. position: relative;
  283. display: block;
  284. box-sizing: border-box;
  285. border: 1px solid #999;
  286. border-radius: $--border-radius-small;
  287. width: 100%;
  288. height: 100%;
  289. text-align: center;
  290. @include when(alpha) {
  291. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
  292. }
  293. }
  294. @include e(color-inner) {
  295. position: absolute;
  296. left: 0;
  297. top: 0;
  298. right: 0;
  299. bottom: 0;
  300. }
  301. @include e(empty) {
  302. font-size: 12px;
  303. color: #999;
  304. position: absolute;
  305. top: 50%;
  306. left: 50%;
  307. transform: translate3d(-50%, -50%, 0);
  308. }
  309. @include e(icon) {
  310. display: inline-block;
  311. position: absolute;
  312. width: 100%;
  313. top: 50%;
  314. left: 50%;
  315. transform: translate3d(-50%, -50%, 0);
  316. color: $--color-white;
  317. text-align: center;
  318. font-size: 12px;
  319. }
  320. @include e(panel) {
  321. position: absolute;
  322. z-index: 10;
  323. padding: 6px;
  324. box-sizing: content-box;
  325. background-color: $--color-white;
  326. border: 1px solid $--border-color-lighter;
  327. border-radius: $--border-radius-base;
  328. box-shadow: $--dropdown-menu-box-shadow;
  329. }
  330. }