xachary
2024-05-31 d5fed8a47c031f6f228ca41ed29c0f9aaf05f623
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.bg-white {
  background-color: var(--component-background-color) !important;
}
 
html[data-theme='light'] {
  .text-secondary {
    color: rgb(0 0 0 / 45%);
  }
 
  .ant-alert-success {
    border: 1px solid #b7eb8f;
    background-color: #f6ffed;
  }
 
  .ant-alert-error {
    border: 1px solid #ffccc7;
    background-color: #fff2f0;
  }
 
  .ant-alert-warning {
    border: 1px solid #ffe58f;
    background-color: #fffbe6;
  }
 
  :not(:root):fullscreen::backdrop {
    background-color: @layout-body-background !important;
  }
}
 
[data-theme='dark'] {
  body {
    background-color: #000;
    color: @text-color-base;
  }
 
  .ant-btn {
    &[disabled],
    &[disabled]:hover,
    &[disabled]:focus,
    &[disabled]:active {
      border-color: #303030;
      background: rgb(255 255 255 / 8%);
      color: rgb(255 255 255 / 30%);
    }
 
    &-success.ant-btn-link.ant-btn-loading,
    &-warning.ant-btn-link.ant-btn-loading,
    &-error.ant-btn-link.ant-btn-loading,
    &-background-ghost.ant-btn-link.ant-btn-loading,
    &.ant-btn-link.ant-btn-loading {
      &::before {
        background: transparent;
      }
    }
 
    &:not(
        .ant-btn-link,
        .is-disabled,
        .ant-btn-primary,
        .ant-btn-success,
        .ant-btn-warning,
        .ant-btn-error,
        .ant-btn-dangerous
      ) {
      background: transparent;
      color: @text-color-base;
 
      &:hover {
        color: @button-primary-hover-color;
      }
    }
 
    &-dangerous.ant-btn-primary {
      &:focus {
        background: @error-color !important;
      }
    }
 
    &-default.ant-btn-dangerous {
      border-color: @error-color;
      background: transparent !important;
      color: @error-color;
 
      &:hover,
      &:focus {
        border-color: @button-error-hover-color !important;
        color: @button-error-hover-color !important;
      }
    }
 
    &-default:not(.ant-btn-background-ghost) {
      border-color: #303030;
 
      &:hover,
      &:focus {
        border-color: @button-cancel-hover-color;
        color: @button-cancel-hover-color;
      }
    }
 
    &-default.is-disabled {
      &:hover,
      &:focus {
        border-color: #303030;
        color: rgb(255 255 255 / 30%);
      }
    }
 
    &-success:not(.is-disabled, .ant-btn-link, .ant-btn-background-ghost) {
      &:hover,
      &:focus,
      &:active {
        border-color: @button-success-active-color !important;
        background-color: @button-success-active-color !important;
        color: @white !important;
      }
    }
 
    &-warning:not(.is-disabled, .ant-btn-link, .ant-btn-background-ghost) {
      &:hover,
      &:focus,
      &:active {
        border-color: @button-warn-active-color !important;
        background-color: @button-warn-active-color !important;
        color: @white !important;
      }
    }
 
    &-error:not(.is-disabled, .ant-btn-link, .ant-btn-background-ghost) {
      &:hover,
      &:focus,
      &:active {
        border-color: @button-error-active-color !important;
        background-color: @button-error-active-color !important;
        color: @white !important;
      }
    }
  }
}