-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtoggle.css
More file actions
186 lines (156 loc) · 4.46 KB
/
Copy pathtoggle.css
File metadata and controls
186 lines (156 loc) · 4.46 KB
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
.toggle {
position: absolute;
top: 10px;
right: 10px;
z-index: 9999;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 0.375rem;
font-weight: 500;
height: 32px;
width: 32px;
padding: 0;
font-size: 1rem;
background-color: transparent;
/* 默认变体:bg-transparent */
color: var(--bs-body-color);
border: 1px solid var(--bs-border-color);
cursor: pointer;
/* 用于聚焦环 */
--tt-ring-color-rgb: var(--bs-primary-rgb);
/* 默认为 Bootstrap primary */
}
.toggle:hover {
background-color: var(--bs-secondary-bg);
/* bg-muted */
/* color: var(--bs-emphasis-color); */
/* text-muted-foreground */
}
.toggle:focus {
/* 标准聚焦 */
outline: 0;
}
.toggle:focus-visible {
outline: 0;
box-shadow:
0 0 0 0.125rem var(--bs-body-bg),
0 0 0 0.25rem rgba(var(--tt-ring-color-rgb), 0.45);
}
/* 为 popup.html调整按钮 */
body.popup-body .toggle {
top: 5px;
right: 5px;
height: 28px;
width: 28px;
font-size: 0.9rem;
border-radius: 0.25rem;
/* 为较小按钮提供略小的圆角 */
}
/* 暗色主题下切换按钮本身的调整 */
html[data-bs-theme="dark"] .toggle {
color: var(--bs-body-color);
border-color: var(--bs-border-color);
--tt-ring-color-rgb: var(--bs-primary-rgb);
/* 确保使用 primary,Bootstrap 会处理暗色 primary */
}
html[data-bs-theme="dark"] .toggle:hover {
background-color: var(--bs-secondary-bg);
/* color: var(--bs-emphasis-color); */
}
html[data-bs-theme="dark"] .invert-on-dark {
filter: invert(1) brightness(1.5);
}
/* 主题切换按钮样式结束 */
/* 暗色主题下浅灰色元素和滚动条的覆盖 */
html[data-bs-theme="dark"] .bg-light {
background-color: #373c42 !important;
color: #e9ecef !important;
}
html[data-bs-theme="dark"] pre {
background-color: #373c42 !important;
color: #e9ecef !important;
border: 1px solid #495057;
/*于定义的边框 */
}
html[data-bs-theme="dark"] .debug-section {
background-color: #373c42 !important;
color: #e9ecef !important;
}
html[data-bs-theme="dark"] .debug-result {
background-color: #2c3034 !important;
/* 结果区域使用略微不同的深色阴影 */
color: #f8f9fa !important;
/* 更亮的灰白色文本 */
border-color: #495057 !important;
}
html[data-bs-theme="dark"] .debug-result code,
html[data-bs-theme="dark"] .debug-result pre,
html[data-bs-theme="dark"] .debug-result span {
color: #f8f9fa !important;
}
.text-dark.fw-bold.small,
.text-dark.small {
color: #bd97ab !important;
}
/* 暗色模式下 #languageSelect 滚动条的覆盖 */
html[data-bs-theme="dark"] #languageSelect::-webkit-scrollbar-track {
background: #373c42;
}
html[data-bs-theme="dark"] #languageSelect::-webkit-scrollbar-thumb {
background: #6c757d;
}
html[data-bs-theme="dark"] #languageSelect::-webkit-scrollbar-thumb:hover {
background: #5a6268;
}
html[data-bs-theme="dark"] #languageSelect {
scrollbar-color: #6c757d #373c42;
}
/* 暗色模式下的表单元素 */
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .form-control {
background-color: #2b3035;
color: #e9ecef;
border-color: #495057;
}
html[data-bs-theme="dark"] .form-select:focus,
html[data-bs-theme="dark"] .form-control:focus {
background-color: #2b3035;
color: #e9ecef;
border-color: #86b7fe;
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
/* 其他可能滚动的元素(如 pre 或 debug-result)的自定义滚动条 */
html[data-bs-theme="dark"] pre::-webkit-scrollbar-track,
html[data-bs-theme="dark"] .debug-result::-webkit-scrollbar-track,
html[data-bs-theme="dark"]
#headerCheckContent::-webkit-scrollbar-track /* popup.html 的特定 ID */ {
background: #2c3034;
}
html[data-bs-theme="dark"] pre::-webkit-scrollbar-thumb,
html[data-bs-theme="dark"] .debug-result::-webkit-scrollbar-thumb,
html[data-bs-theme="dark"] #headerCheckContent::-webkit-scrollbar-thumb {
background: #555;
}
html[data-bs-theme="dark"] pre::-webkit-scrollbar-thumb:hover,
html[data-bs-theme="dark"] .debug-result::-webkit-scrollbar-thumb:hover,
html[data-bs-theme="dark"] #headerCheckContent::-webkit-scrollbar-thumb:hover {
background: #777;
}
html[data-bs-theme="dark"] pre,
html[data-bs-theme="dark"] .debug-result,
html[data-bs-theme="dark"] #headerCheckContent {
scrollbar-width: thin;
scrollbar-color: #555 #2c3034;
}
/* 规则分隔线样式 */
.rule-separator {
border-top: 1px solid var(--bs-border-color);
margin: 0.5rem 0;
padding: 0;
height: 1px;
list-style: none;
}
html[data-bs-theme="dark"] .rule-separator {
border-top-color: #495057;
}