fix: align new-session styling and improve dark theme startup

This commit is contained in:
Shantur Rathore
2025-10-29 00:44:51 +00:00
parent 317d076117
commit 30992fbf48
6 changed files with 205 additions and 48 deletions

View File

@@ -76,6 +76,22 @@
@apply cursor-not-allowed opacity-50;
}
/* Ensure Tailwind base reset on [type="button"] doesn't remove accent styles */
button.button-primary {
background-color: var(--accent-primary);
color: var(--text-inverted);
}
[data-theme="dark"] button.button-primary {
background-color: #3f3f46;
color: #f5f6f8;
}
[data-theme="dark"] button.button-primary:hover:not(:disabled) {
background-color: #52525b;
opacity: 1;
}
.button-secondary {
@apply inline-flex items-center justify-center gap-2 rounded-lg px-6 py-3 text-base font-medium transition-colors;
background-color: var(--surface-secondary);
@@ -378,12 +394,23 @@
background-color: var(--surface-hover);
}
[data-theme="dark"] .tab-active {
background-color: #3f3f46;
color: #f5f6f8;
}
[data-theme="dark"] .tab-active:hover {
background-color: #52525b;
}
[data-theme="dark"] .tab-inactive {
background-color: var(--surface-muted);
background-color: #2a2a31;
color: #d4d4d8;
}
[data-theme="dark"] .tab-inactive:hover {
background-color: var(--surface-hover);
background-color: #3f3f46;
color: #f5f6f8;
}
.tab-label {
@@ -410,6 +437,15 @@
background-color: var(--surface-hover);
}
[data-theme="dark"] .new-tab-button {
background-color: #3f3f46;
color: #f5f6f8;
}
[data-theme="dark"] .new-tab-button:hover {
background-color: #52525b;
}
.new-tab-button:focus-visible {
@apply ring-2 ring-offset-1;
ring-color: var(--accent-primary);
@@ -1201,12 +1237,16 @@
}
.selector-button {
@apply px-3 py-1.5 text-sm rounded transition-colors cursor-pointer;
@apply px-3 py-1.5 text-sm rounded transition-colors cursor-pointer w-full inline-flex items-center justify-center font-medium;
background-color: var(--surface-secondary);
color: var(--text-primary);
border: 1px solid var(--border-base);
}
.selector-button-primary {
background-color: var(--accent-primary);
color: var(--text-inverted);
background-color: var(--accent-primary) !important;
color: var(--text-inverted) !important;
border: 1px solid var(--accent-primary) !important;
}
.selector-button-primary:hover:not(:disabled) {
@@ -1374,7 +1414,7 @@
}
.panel-section-header {
@apply w-full px-4 py-3 flex items-center justify-between transition-colors cursor-pointer;
@apply w-full px-4 py-3 flex items-center justify-center transition-colors cursor-pointer gap-2;
background-color: var(--surface-secondary);
}

View File

@@ -58,6 +58,68 @@
--line-height-relaxed: 1.6;
}
@media (prefers-color-scheme: dark) {
:root {
/* Surface tokens */
--surface-base: #1a1a1a;
--surface-secondary: #2a2a2a;
--surface-muted: #212529;
--surface-code: #1a1a1a;
--surface-hover: #3a3a3a;
/* Border tokens */
--border-base: #3a3a3a;
--border-secondary: #3a3a3a;
--border-muted: #3a3a3a;
/* Text tokens */
--text-primary: #e0e0e0;
--text-secondary: #999999;
--text-muted: #999999;
--text-inverted: #1a1a1a;
/* Accent tokens */
--accent-primary: #0080ff;
--accent-hover: #0066cc;
/* Status tokens */
--status-success: #4caf50;
--status-error: #f44336;
--status-warning: #ff9800;
/* Message-specific tokens */
--message-user-bg: #1a2332;
--message-user-border: #42a5f5;
--message-assistant-bg: #251a2e;
--message-assistant-border: #ba68c8;
--message-tool-bg: #212529;
--message-tool-border: #adb5bd;
/* Typography tokens (same as light theme) */
--font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
--font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
/* Font weights */
--font-weight-regular: 400;
--font-weight-medium: 500;
--font-weight-semibold: 600;
--font-weight-bold: 700;
/* Font sizes */
--font-size-xs: 11px;
--font-size-sm: 12px;
--font-size-base: 14px;
--font-size-lg: 16px;
--font-size-xl: 18px;
--font-size-2xl: 20px;
/* Line heights */
--line-height-tight: 1.25;
--line-height-normal: 1.5;
--line-height-relaxed: 1.6;
}
}
[data-theme="dark"] {
/* Surface tokens */
--surface-base: #1a1a1a;
@@ -116,4 +178,4 @@
--line-height-tight: 1.25;
--line-height-normal: 1.5;
--line-height-relaxed: 1.6;
}
}