theme.less 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. @import './themify/dark.less';
  2. @import './themify/light.less';
  3. @import './themify/vent1.less';
  4. @ventSpace: zxm;
  5. .bg-white {
  6. background-color: @component-background !important;
  7. }
  8. html[data-theme='light'] {
  9. .text-secondary {
  10. color: rgba(0, 0, 0, 0.45);
  11. }
  12. /*【美化】自定义table字体颜色*/
  13. .@{ventSpace}-table {
  14. color: rgba(0, 0, 0, 0.65);
  15. }
  16. /*【美化】自定义table字体颜色*/
  17. /*【美化】自定义form字体颜色*/
  18. .@{ventSpace}-select-multiple .@{ventSpace}-select-selection-item-content {
  19. color: rgba(0, 0, 0, 0.65);
  20. }
  21. .@{ventSpace}-input-affix-wrapper>input.@{ventSpace}-input {
  22. color: rgba(0, 0, 0, 0.65);
  23. }
  24. .@{ventSpace}-select-single.@{ventSpace}-select-show-arrow .@{ventSpace}-select-selection-item,
  25. .@{ventSpace}-select-single.@{ventSpace}-select-show-arrow .@{ventSpace}-select-selection-placeholder {
  26. color: rgba(0, 0, 0, 0.65);
  27. }
  28. /*【美化】自定义form字体颜色*/
  29. .@{ventSpace}-alert-success {
  30. background-color: #f6ffed;
  31. border: 1px solid #b7eb8f;
  32. }
  33. .@{ventSpace}-alert-error {
  34. background-color: #fff2f0;
  35. border: 1px solid #ffccc7;
  36. }
  37. .@{ventSpace}-alert-warning {
  38. background-color: #fffbe6;
  39. border: 1px solid #ffe58f;
  40. }
  41. :not(:root):fullscreen::backdrop {
  42. background-color: @layout-body-background !important;
  43. }
  44. }
  45. [data-theme='dark'] {
  46. .text-secondary {
  47. color: #8b949e;
  48. }
  49. .@{ventSpace}-card-grid-hoverable:hover {
  50. box-shadow: 0 3px 6px -4px rgb(0 0 0 / 48%), 0 6px 16px 0 rgb(0 0 0 / 32%), 0 9px 28px 8px rgb(0 0 0 / 20%);
  51. }
  52. .@{ventSpace}-card-grid {
  53. box-shadow: 1px 0 0 0 #434343, 0 1px 0 0 #434343, 1px 1px 0 0 #434343, 1px 0 0 0 #434343 inset, 0 1px 0 0 #434343 inset;
  54. }
  55. .@{ventSpace}-calendar-selected-day .@{ventSpace}-calendar-date {
  56. color: rgba(0, 0, 0, 0.8);
  57. }
  58. .@{ventSpace}-select-tree li .@{ventSpace}-select-tree-node-content-wrapper.@{ventSpace}-select-tree-node-selected {
  59. color: rgba(0, 0, 0, 0.9);
  60. }
  61. }
  62. // 下面的代码负责将 themify 文件夹下声明的 css 变量赋给 less 变量
  63. @themify-text-primary: var(--themify-text-primary);
  64. // 下面的代码负责将主题相关的选择器、图片前缀等 less 变量声明
  65. @theme-dark: ~"html[data-theme='dark2']";
  66. @theme-light: ~"html[data-theme='light']";
  67. @theme-vent1: ~"html[data-theme='vent1']";