1
1
/* ThinkingBox.css */
2
+
3
+ /* Apply transition to dark mode as well to ensure smooth color changes */
4
+ html {
5
+ transition :
6
+ background-color 0.2s ease-in-out,
7
+ color 0.2s ease-in-out;
8
+ }
9
+
2
10
: root {
3
11
--thinking-border-color : rgba (0 , 0 , 0 , 0.1 );
4
12
--thinking-bg-color : transparent;
22
30
.thinking-box {
23
31
width : 98% ;
24
32
max-width : 100% ;
25
- margin : 0.75rem 0 ;
26
33
position : relative;
27
34
}
28
35
36
+ /* Simple direct rule to prevent border flash in dark mode */
37
+ .dark .thinking-box * {
38
+ border-color : rgba (255 , 255 , 255 , 0.1 );
39
+ }
40
+
29
41
.thinking-box__container {
30
42
border : 1px solid var (--thinking-border-color );
31
43
border-radius : 0.75rem ;
55
67
border-bottom : none;
56
68
}
57
69
70
+ /* Style for the transitioning state to prevent flashing */
71
+ .thinking-box__container--transitioning {
72
+ pointer-events : none; /* Prevent interactions during transition */
73
+ }
74
+
75
+ /* Fix for the flashing white border in dark mode */
76
+ .dark .thinking-box__container--transitioning {
77
+ border-color : rgba (255 , 255 , 255 , 0.1 );
78
+ }
79
+
80
+ .dark .thinking-box__container--transitioning .thinking-box__header {
81
+ border-bottom-color : rgba (255 , 255 , 255 , 0.1 );
82
+ }
83
+
84
+ .dark .thinking-box__container--transitioning .thinking-box__content {
85
+ border-top-color : rgba (255 , 255 , 255 , 0.1 );
86
+ }
87
+
88
+ .dark .thinking-box__container--transitioning .thinking-box__preview--crawling {
89
+ border-top-color : rgba (255 , 255 , 255 , 0.1 );
90
+ }
91
+
58
92
.thinking-box__header {
59
93
display : flex;
60
94
align-items : center;
95
129
.thinking-box__timer {
96
130
font-size : 0.8rem ;
97
131
color : var (--thinking-text-color );
98
- margin-left : 0.25rem ;
99
132
}
100
133
101
134
.thinking-box__collapse-icon {
167
200
.thinking-box__fade-container ::before {
168
201
top : 0 ;
169
202
background : linear-gradient (
170
- to bottom,
171
- var (--thinking-fade-start ),
172
- rgba (var (--thinking-fade-start-rgb , 249 , 250 , 251 ), 0.85 ) 25% ,
203
+ to bottom,
204
+ var (--thinking-fade-start ),
205
+ rgba (var (--thinking-fade-start-rgb , 249 , 250 , 251 ), 0.85 ) 25% ,
173
206
var (--thinking-fade-end ) 100%
174
207
);
175
208
}
176
209
177
210
.thinking-box__fade-container ::after {
178
211
bottom : 0 ;
179
212
background : linear-gradient (
180
- to top,
181
- var (--thinking-fade-start ),
182
- rgba (var (--thinking-fade-start-rgb , 249 , 250 , 251 ), 0.85 ) 25% ,
213
+ to top,
214
+ var (--thinking-fade-start ),
215
+ rgba (var (--thinking-fade-start-rgb , 249 , 250 , 251 ), 0.85 ) 25% ,
183
216
var (--thinking-fade-end ) 100%
184
217
);
185
218
}
186
219
187
220
.dark .thinking-box__fade-container ::before {
188
221
background : linear-gradient (
189
- to bottom,
190
- var (--thinking-fade-start ),
191
- rgba (var (--thinking-fade-start-rgb , 30 , 41 , 59 ), 0.85 ) 25% ,
222
+ to bottom,
223
+ var (--thinking-fade-start ),
224
+ rgba (var (--thinking-fade-start-rgb , 30 , 41 , 59 ), 0.85 ) 25% ,
192
225
var (--thinking-fade-end ) 100%
193
226
);
194
227
}
195
228
196
229
.dark .thinking-box__fade-container ::after {
197
230
background : linear-gradient (
198
- to top,
199
- var (--thinking-fade-start ),
200
- rgba (var (--thinking-fade-start-rgb , 30 , 41 , 59 ), 0.85 ) 25% ,
231
+ to top,
232
+ var (--thinking-fade-start ),
233
+ rgba (var (--thinking-fade-start-rgb , 30 , 41 , 59 ), 0.85 ) 25% ,
201
234
var (--thinking-fade-end ) 100%
202
235
);
203
236
}
218
251
transform : translateZ (0 );
219
252
backface-visibility : hidden;
220
253
-webkit-font-smoothing : antialiased;
221
- -webkit-mask-image : linear-gradient (to bottom, transparent, black 12% , black 88% , transparent);
222
- mask-image : linear-gradient (to bottom, transparent, black 12% , black 88% , transparent);
254
+ -webkit-mask-image : linear-gradient (
255
+ to bottom,
256
+ transparent,
257
+ black 12% ,
258
+ black 88% ,
259
+ transparent
260
+ );
261
+ mask-image : linear-gradient (
262
+ to bottom,
263
+ transparent,
264
+ black 12% ,
265
+ black 88% ,
266
+ transparent
267
+ );
223
268
}
224
269
225
270
/* Enhanced text during crawling */
235
280
236
281
/* Animation for thinking indicator */
237
282
@keyframes pulse {
238
- 0% { opacity : 0.5 ; }
239
- 50% { opacity : 1 ; }
240
- 100% { opacity : 0.5 ; }
283
+ 0% {
284
+ opacity : 0.5 ;
285
+ }
286
+ 50% {
287
+ opacity : 1 ;
288
+ }
289
+ 100% {
290
+ opacity : 0.5 ;
291
+ }
241
292
}
242
293
243
294
/* Fade in animation */
244
295
@keyframes fadeIn {
245
- from { opacity : 0 ; }
246
- to { opacity : 1 ; }
296
+ from {
297
+ opacity : 0 ;
298
+ }
299
+ to {
300
+ opacity : 1 ;
301
+ }
247
302
}
248
303
249
304
/* Smooth scrolling effect */
250
305
@keyframes scrollText {
251
- 0% { transform : translateY (0 ); }
252
- 100% { transform : translateY (-100% ); }
306
+ 0% {
307
+ transform : translateY (0 );
308
+ }
309
+ 100% {
310
+ transform : translateY (-100% );
311
+ }
253
312
}
254
313
255
314
.thinking-box__preview-text {
256
- font-family : ' SFMono-Regular' , Consolas, ' Liberation Mono' , Menlo, monospace;
315
+ font-family : " SFMono-Regular" , Consolas, " Liberation Mono" , Menlo, monospace;
257
316
font-size : 0.7rem ;
258
317
color : var (--thinking-text-color );
259
318
white-space : pre-wrap;
266
325
267
326
/* Enhanced masking during crawling */
268
327
.thinking-box__preview--crawling .thinking-box__scroll-content {
269
- -webkit-mask-image : linear-gradient (to bottom, transparent, black 8% , black 92% , transparent);
270
- mask-image : linear-gradient (to bottom, transparent, black 8% , black 92% , transparent);
328
+ -webkit-mask-image : linear-gradient (
329
+ to bottom,
330
+ transparent,
331
+ black 8% ,
332
+ black 92% ,
333
+ transparent
334
+ );
335
+ mask-image : linear-gradient (
336
+ to bottom,
337
+ transparent,
338
+ black 8% ,
339
+ black 92% ,
340
+ transparent
341
+ );
271
342
padding : 0.75rem 1rem ;
272
343
}
273
344
274
- .thinking-box__icon--active {
275
- animation : pulse 1.5s infinite ease-in-out;
276
- opacity : 1 ;
277
- color : var (--thinking-title-color );
278
- }
279
-
280
345
/* Make sure the preview adjusts immediately when new content arrives */
281
346
.thinking-box__preview--crawling .thinking-box__scroll-content {
282
347
transition : height 0.3s ease-out;
302
367
303
368
.dark .thinking-box__container--collapsed .thinking-box__header : hover {
304
369
background-color : rgba (255 , 255 , 255 , 0.03 );
305
- }
370
+ }
0 commit comments