color.scss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. /**
  2. * 颜色模块,对必要的颜色样值,提供单独的类名,用于强制覆盖原样式
  3. * [注]各种前缀的颜色
  4. * theme - 主题色调
  5. * text - 文本颜色
  6. * bg - 背景色
  7. * bd - 边框色
  8. * @since 1.0.0
  9. * @version 1.0.0
  10. */
  11. /* ==========================================================================
  12. 零碎
  13. ========================================================================== */
  14. .clr-bg-white {
  15. background-color: #ffffff;
  16. }
  17. .clr-bg-white80 {
  18. background-color: rgba(255, 255, 255, 0.8);
  19. }
  20. .clr-bg-white60 {
  21. background-color: rgba(255, 255, 255, 0.6);
  22. }
  23. .clr-bg-transparent {
  24. background-color: transparent;
  25. }
  26. .clr-bg-gray {
  27. background-color: #f8f8f8;
  28. }
  29. .clr-text-white {
  30. color: white;
  31. }
  32. .clr-text-purple {
  33. color: #7468f2;
  34. }
  35. .white {
  36. color: #ffffff;
  37. }
  38. .blue-bg {
  39. background-color: rgba(42, 130, 228, 1) !important;
  40. }
  41. .blue-text {
  42. color: rgba(42, 130, 228, 1) !important;
  43. }
  44. /* ==========================================================================
  45. 主题色
  46. ========================================================================== */
  47. $ui-theme-background-color: namespace('clr'); // 背景色命名
  48. $ui-theme-text-color: namespace('clr-text'); // 文字色命名
  49. $ui-theme-border-color: namespace('clr-bd'); // 边框色命名
  50. $ui-clr-map: (
  51. 'pri': $ui-clr-pri,
  52. 'comp': $ui-clr-comp,
  53. 'cont': $ui-clr-cont,
  54. 'spec': $ui-clr-spec,
  55. );
  56. $ui-theme-background-color: namespace('clr'); // 背景色命名
  57. $ui-theme-text-color: namespace('clr-text'); // 文字色命名
  58. $ui-theme-border-color: namespace('clr-bd'); // 边框色命名
  59. $ui-clr-map: (
  60. 'pri': $ui-clr-pri,
  61. 'comp': $ui-clr-comp,
  62. 'cont': $ui-clr-cont,
  63. 'spec': $ui-clr-spec,
  64. );
  65. @each $key, $value in $ui-clr-map {
  66. @if ($value) {
  67. .#{$ui-theme-background-color + '-' + $key} {
  68. background-color: $value;
  69. }
  70. .#{$ui-theme-text-color + '-' + $key} {
  71. color: $value;
  72. }
  73. .#{$ui-theme-border-color + '-' + $key} {
  74. border-color: $value;
  75. }
  76. }
  77. }
  78. /* ==========================================================================
  79. 状态色
  80. ========================================================================== */
  81. $ui-state-background-color: namespace('clr'); // 背景色命名
  82. $ui-state-text-color: namespace('clr-text'); // 文字色命名
  83. $ui-state-border-color: namespace('clr-bd'); // 边框色命名
  84. $ui-state-clr-map: (
  85. 'safe-pri': $ui-clr-safe-pri,
  86. 'safe-comp': $ui-clr-safe-comp,
  87. 'safe-cont': $ui-clr-safe-cont,
  88. 'safe-spec': $ui-clr-safe-spec,
  89. 'succ-pri': $ui-clr-succ-pri,
  90. 'succ-comp': $ui-clr-succ-comp,
  91. 'succ-cont': $ui-clr-succ-cont,
  92. 'succ-spec': $ui-clr-succ-spec,
  93. 'warn-pri': $ui-clr-warn-pri,
  94. 'warn-comp': $ui-clr-warn-comp,
  95. 'warn-cont': $ui-clr-warn-cont,
  96. 'warn-spec': $ui-clr-warn-spec,
  97. 'dang-pri': $ui-clr-dang-pri,
  98. 'dang-comp': $ui-clr-dang-comp,
  99. 'dang-cont': $ui-clr-dang-cont,
  100. 'dang-spec': $ui-clr-dang-spec,
  101. );
  102. @each $key, $value in $ui-state-clr-map {
  103. @if ($value) {
  104. .#{$ui-state-background-color + '-' + $key} {
  105. background-color: $value;
  106. }
  107. .#{$ui-state-text-color + '-' + $key} {
  108. color: $value;
  109. }
  110. .#{$ui-state-border-color + '-' + $key} {
  111. border-color: $value;
  112. }
  113. }
  114. }
  115. /* ==========================================================================
  116. 常规文本色
  117. ========================================================================== */
  118. $ui-text-color: namespace('tclr'); // 背景色命名
  119. $ui-text-clr-map: (
  120. 'pri': $ui-clr-text-pri,
  121. 'comp': $ui-clr-text-comp,
  122. 'cont': $ui-clr-text-cont,
  123. 'spec': $ui-clr-text-spec,
  124. );
  125. @each $key, $value in $ui-text-clr-map {
  126. @if ($value) {
  127. .#{$ui-text-color + '-' + $key} {
  128. color: $value;
  129. }
  130. }
  131. }
  132. /* ==========================================================================
  133. 常规背景色
  134. ========================================================================== */
  135. $ui-bg-color: namespace('bclr'); // 背景色命名
  136. $ui-bg-clr-map: (
  137. 'pri': $ui-clr-bg-pri,
  138. 'comp': $ui-clr-bg-comp,
  139. 'cont': $ui-clr-bg-cont,
  140. 'spec': $ui-clr-bg-spec,
  141. );
  142. @each $key, $value in $ui-bg-clr-map {
  143. @if ($value) {
  144. .#{$ui-bg-color + '-' + $key} {
  145. background-color: $value;
  146. }
  147. }
  148. }
  149. /* ==========================================================================
  150. 常规边框色
  151. ========================================================================== */
  152. $ui-line-color: namespace('bdclr'); // 背景色命名
  153. $ui-line-clr-map: (
  154. 'pri': $ui-clr-line-pri,
  155. 'comp': $ui-clr-line-comp,
  156. 'cont': $ui-clr-line-cont,
  157. 'spec': $ui-clr-line-spec,
  158. );
  159. @each $key, $value in $ui-line-clr-map {
  160. @if ($value) {
  161. .#{$ui-line-color + '-' + $key} {
  162. border-color: $value;
  163. }
  164. }
  165. }
  166. .clr-gray {
  167. color: #ccc;
  168. }
  169. .clr-999 {
  170. color: #999;
  171. }
  172. .clr-666 {
  173. color: #666;
  174. }
  175. .clr-333 {
  176. color: #333;
  177. }
  178. .clr-purple {
  179. color: #7468f2;
  180. }
  181. .clr-orange {
  182. color: #ff8c39;
  183. }
  184. .clr-count {
  185. color: #ff4539;
  186. }
  187. .clr-red {
  188. color: red;
  189. }
  190. .label-state {
  191. width: 66px;
  192. font-size: 14px;
  193. border-radius: 4px;
  194. text-align: center;
  195. font-weight: 400;
  196. &.success {
  197. color: #46c35f;
  198. background: #eaf8ed;
  199. }
  200. &.wait {
  201. color: #ff8c39;
  202. background: #fff3eb;
  203. }
  204. &.default {
  205. color: #999999;
  206. background: #e8e7e6;
  207. }
  208. &.failure {
  209. color: #333333;
  210. background: #e8e7e6;
  211. }
  212. }