Skip to content

Commit e463820

Browse files
committed
fix(ui): fix dark-theme colors in chat
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent 8839a71 commit e463820

1 file changed

Lines changed: 33 additions & 13 deletions

File tree

core/http/react-ui/src/App.css

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,7 @@ select.input {
22242224

22252225
.chat-message-user .chat-message-avatar {
22262226
background: var(--color-primary);
2227-
color: white;
2227+
color: var(--color-primary-text);
22282228
}
22292229

22302230
.chat-message-assistant .chat-message-avatar {
@@ -2260,7 +2260,7 @@ select.input {
22602260

22612261
.chat-message-user .chat-message-content {
22622262
background: var(--color-primary);
2263-
color: white;
2263+
color: var(--color-primary-text);
22642264
border-color: var(--color-primary);
22652265
border-radius: 16px 4px 16px 16px;
22662266
}
@@ -2276,8 +2276,17 @@ select.input {
22762276
}
22772277

22782278
.chat-message-user .chat-message-content pre {
2279-
background: rgba(0, 0, 0, 0.15);
2280-
border-color: rgba(255, 255, 255, 0.1);
2279+
background: color-mix(in oklab, var(--color-primary-text) 12%, transparent);
2280+
border-color: color-mix(in oklab, var(--color-primary-text) 18%, transparent);
2281+
color: var(--color-primary-text);
2282+
}
2283+
.chat-message-user .chat-message-content code {
2284+
color: var(--color-primary-text);
2285+
}
2286+
.chat-message-user .chat-message-content a {
2287+
color: var(--color-primary-text);
2288+
text-decoration: underline;
2289+
text-underline-offset: 2px;
22812290
}
22822291

22832292
.chat-message-content code {
@@ -2405,7 +2414,7 @@ select.input {
24052414
.chat-send-btn {
24062415
padding: var(--spacing-xs);
24072416
background: var(--color-primary);
2408-
color: white;
2417+
color: var(--color-primary-text);
24092418
border: none;
24102419
border-radius: var(--radius-md);
24112420
cursor: pointer;
@@ -2415,7 +2424,7 @@ select.input {
24152424
width: 36px;
24162425
height: 36px;
24172426
flex-shrink: 0;
2418-
transition: background var(--duration-fast);
2427+
transition: background var(--duration-fast), transform var(--duration-fast);
24192428
}
24202429

24212430
.chat-send-btn:hover:not(:disabled) {
@@ -2556,9 +2565,20 @@ select.input {
25562565
white-space: nowrap;
25572566
}
25582567

2559-
/* Message completion flash */
2560-
.chat-message-bubble {
2561-
transition: border-color 300ms ease;
2568+
/* Message completion flash — briefly highlights the last assistant bubble when streaming ends */
2569+
@keyframes messageCompletionFlash {
2570+
0% { box-shadow: 0 0 0 0 var(--color-primary-border); }
2571+
40% { box-shadow: 0 0 0 3px var(--color-primary-light); }
2572+
100% { box-shadow: 0 0 0 0 transparent; }
2573+
}
2574+
.chat-message-new .chat-message-content {
2575+
animation: messageCompletionFlash 600ms ease-out;
2576+
}
2577+
2578+
@media (prefers-reduced-motion: reduce) {
2579+
.chat-message { animation: none; }
2580+
.chat-message-new .chat-message-content { animation: none; }
2581+
.chat-thinking-dots span { animation: none; opacity: 0.7; }
25622582
}
25632583

25642584
/* Chat empty state */
@@ -2813,13 +2833,13 @@ select.input {
28132833
overflow-y: auto;
28142834
}
28152835
.chat-activity-thinking {
2816-
border-left-color: rgba(59, 130, 246, 0.3);
2836+
border-left-color: var(--color-info-border);
28172837
}
28182838
.chat-activity-tool-call {
2819-
border-left-color: rgba(245, 158, 11, 0.3);
2839+
border-left-color: var(--color-warning-border);
28202840
}
28212841
.chat-activity-tool-result {
2822-
border-left-color: rgba(34, 197, 94, 0.3);
2842+
border-left-color: var(--color-success-border);
28232843
}
28242844

28252845
/* Context window progress bar */
@@ -3228,7 +3248,7 @@ select.input {
32283248
align-items: center;
32293249
gap: 4px;
32303250
padding: 2px 6px;
3231-
background: rgba(59, 130, 246, 0.1);
3251+
background: color-mix(in oklab, currentColor 12%, transparent);
32323252
border-radius: var(--radius-sm);
32333253
font-size: 0.7rem;
32343254
color: var(--color-text-secondary);

0 commit comments

Comments
 (0)