Skip to content

Commit b9e7f3a

Browse files
committed
dark mode theme enhancements
bit of gloss :)
1 parent cb42204 commit b9e7f3a

File tree

2 files changed

+134
-1
lines changed

2 files changed

+134
-1
lines changed

webview-ui/src/components/history/HistoryPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
3333
)}
3434
{tasks.length === 0 && (
3535
<>
36-
<p className="outline rounded p-4">
36+
<p className=" border-[#555] p-2 text-lg text-center mx-8">
3737
<Trans
3838
i18nKey="chat:onboarding"
3939
components={{

webview-ui/src/index.css

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,136 @@ input[cmdk-input]:focus {
392392
.custom-markdown > pre {
393393
background-color: transparent !important;
394394
}
395+
/**
396+
* VSCode UI Component Defaults
397+
* Apply consistent styling to VSCode WebUI components
398+
* These effects are for dark mode only
399+
*/
400+
401+
@media (prefers-color-scheme: dark) {
402+
/* Common styles for VSCode components */
403+
vscode-button,
404+
vscode-dropdown,
405+
vscode-input,
406+
vscode-progress-ring,
407+
vscode-tag,
408+
vscode-text-area,
409+
vscode-text-field,
410+
vscode-progress,
411+
vscode-divider,
412+
vscode-option,
413+
vscode-data-grid {
414+
border-radius: var(--radius-sm);
415+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.05));
416+
border-color: var(--vscode-input-border);
417+
border-width: 0.5px;
418+
}
419+
420+
/* Specific overrides for certain components */
421+
vscode-checkbox::part(control),
422+
vscode-radio::part(control),
423+
vscode-switch::part(switch) {
424+
border-radius: var(--radius-sm);
425+
border-color: var(--vscode-input-border);
426+
}
427+
428+
vscode-progress::part(progress),
429+
vscode-progress::part(bar) {
430+
border-radius: var(--radius-sm);
431+
}
432+
433+
vscode-dropdown::part(control),
434+
vscode-dropdown::part(listbox) {
435+
border-radius: var(--radius-sm);
436+
border-color: var(--vscode-input-border);
437+
}
438+
439+
/* Active/focus states */
440+
vscode-button:focus,
441+
vscode-checkbox:focus,
442+
vscode-dropdown:focus,
443+
vscode-input:focus,
444+
vscode-radio:focus,
445+
vscode-text-field:focus,
446+
vscode-text-area:focus {
447+
outline-color: var(--vscode-focusBorder);
448+
outline-width: 1px;
449+
outline-offset: 1px;
450+
}
451+
452+
/* Global rounded-sm for buttons, textareas, and textfields */
453+
button,
454+
vscode-button,
455+
textarea,
456+
input[type="text"] {
457+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.05));
458+
border-radius: var(--radius-sm);
459+
border-color: var(--color-gray-500) !important;
460+
border-width: 0.5px !important;
461+
}
462+
463+
/* Glass/shimmer effect for buttons on hover */
464+
button:hover,
465+
vscode-button:hover::part(control) {
466+
position: relative;
467+
overflow: hidden;
468+
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.05));
469+
}
470+
471+
button:hover::after,
472+
vscode-button:hover::part(control)::after {
473+
content: "";
474+
position: absolute;
475+
top: -50%;
476+
left: -50%;
477+
width: 200%;
478+
height: 200%;
479+
background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.1) 30%, rgba(0, 0, 0, 0) 75%);
480+
transform: rotate(30deg);
481+
animation: shimmer 1s forwards;
482+
pointer-events: none;
483+
}
484+
485+
@keyframes shimmer {
486+
0% {
487+
transform: translateX(-100%) rotate(30deg);
488+
}
489+
100% {
490+
transform: translateX(100%) rotate(30deg);
491+
}
492+
}
493+
494+
/* Subtle top-left background light effect */
495+
body {
496+
background-image: radial-gradient(circle at top left, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
497+
}
498+
499+
/* Light source effect for elements */
500+
.light-source-effect {
501+
box-shadow:
502+
inset 1px 1px 0 rgba(255, 255, 255, 0.05),
503+
inset -1px -1px 0 rgba(0, 0, 0, 0.05);
504+
}
505+
506+
/* Apply subtle top-left highlight to cards */
507+
.card,
508+
[class*="card-"],
509+
.shadow-sm,
510+
.shadow,
511+
.shadow-md {
512+
position: relative;
513+
}
514+
515+
.card::before,
516+
[class*="card-"]::before,
517+
.shadow-sm::before,
518+
.shadow::before,
519+
.shadow-md::before {
520+
content: "";
521+
position: absolute;
522+
inset: 0;
523+
background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
524+
border-radius: inherit;
525+
pointer-events: none;
526+
}
527+
}

0 commit comments

Comments
 (0)