inject vscode css vars

This commit is contained in:
Aneta Jastrzębska 2024-09-21 11:38:31 +02:00
parent 939aa008b3
commit afb0247063
2 changed files with 25 additions and 7 deletions

View file

@ -69,7 +69,7 @@
"activitybar": [
{
"id": "voidViewContainer",
"title": "My Extension",
"title": "Chat",
"icon": "$(hubot)"
}
]

View file

@ -1,8 +1,26 @@
/** @type {import('tailwindcss').Config} */
// inject user's vscode theme colors: https://code.visualstudio.com/api/extension-guides/webview#theming-webview-content
module.exports = {
content: ["./src/sidebar/**/*.{html,js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
}
content: ["./src/sidebar/**/*.{html,js,ts,jsx,tsx}"],
theme: {
extend: {
colors: {
vscode: {
'editor-bg': "var(--vscode-editor-background)",
'editor-fg': "var(--vscode-editor-foreground)",
'input-bg': "var(--vscode-input-background)",
'input-fg': "var(--vscode-input-foreground)",
'input-border': "var(--vscode-input-border)",
'button-fg': "var(--vscode-button-foreground)",
'button-bg': "var(--vscode-button-background)",
'button-hoverBg': "var(--vscode-button-hoverBackground)",
'button-secondary-fg': "var(--vscode-button-secondaryForeground)",
'button-secondary-bg': "var(--vscode-button-secondaryBackground)",
'button-secondary-hoverBg': "var(--vscode-button-secondaryHoverBackground)",
},
},
},
},
plugins: [],
};