Skip to content

Commit 477daf8

Browse files
committed
update css variable for shadcn component
1 parent 43bcfe3 commit 477daf8

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

webview-ui/src/index.css

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,67 @@
11
@import "tailwindcss";
22

3+
@layer base {
4+
/* Theme Variables - VSCode Integration */
5+
:root {
6+
/* Base Colors */
7+
--background: var(--vscode-editor-background);
8+
--foreground: var(--vscode-editor-foreground);
9+
10+
/* Component Colors */
11+
--card: var(--vscode-editor-background);
12+
--card-foreground: var(--vscode-editor-foreground);
13+
--popover: var(--vscode-menu-background, var(--vscode-editor-background));
14+
--popover-foreground: var(--vscode-menu-foreground, var(--vscode-editor-foreground));
15+
16+
/* Button Colors */
17+
--primary: var(--vscode-button-background);
18+
--primary-foreground: var(--vscode-button-foreground);
19+
--secondary: var(--vscode-button-secondaryBackground);
20+
--secondary-foreground: var(--vscode-button-secondaryForeground);
21+
--accent: var(--vscode-focusBorder);
22+
--accent-foreground: var(--vscode-button-foreground);
23+
24+
/* State Colors */
25+
--muted: var(--vscode-disabledForeground);
26+
--muted-foreground: var(--vscode-descriptionForeground);
27+
--destructive: var(--vscode-errorForeground);
28+
--destructive-foreground: var(--vscode-editor-background);
29+
30+
/* UI Elements */
31+
--border: var(--vscode-widget-border);
32+
--input: var(--vscode-input-background);
33+
--ring: var(--vscode-focusBorder);
34+
--radius: 0.5rem;
35+
36+
/* Chart Colors - Using VSCode's chart colors */
37+
--chart-1: var(--vscode-charts-red);
38+
--chart-2: var(--vscode-charts-blue);
39+
--chart-3: var(--vscode-charts-yellow);
40+
--chart-4: var(--vscode-charts-orange);
41+
--chart-5: var(--vscode-charts-green);
42+
}
43+
}
44+
45+
@layer components {
46+
/* Border Styles */
47+
.border,
48+
.border-r,
49+
.border-l,
50+
.border-t,
51+
.border-b,
52+
.border-x,
53+
.border-y {
54+
border-color: var(--border);
55+
}
56+
57+
/* Code Block Styles */
58+
pre,
59+
code {
60+
background-color: var(--vscode-textCodeBlock-background);
61+
}
62+
}
63+
64+
/* Form Element Focus States */
365
textarea:focus {
466
outline: 1.5px solid var(--vscode-focusBorder, #007fd4);
567
}

0 commit comments

Comments
 (0)