diff --git a/packages/language-server/src/tokens/get-token.ts b/packages/language-server/src/tokens/get-token.ts index d7d4b88..8a79638 100644 --- a/packages/language-server/src/tokens/get-token.ts +++ b/packages/language-server/src/tokens/get-token.ts @@ -70,7 +70,7 @@ export const getTokenFromPropValue = (ctx: PandaContext, prop: string, value: st let color = token.value // could be a semantic token, so the token.value wouldn't be a color directly, it's actually a CSS variable - if (!isColor(color) && token.value.startsWith('var(--')) { + if (!isColor(color) && typeof token.value === "string" && token.value.startsWith('var(--')) { const [tokenRef] = ctx.tokens.getReferences(token.originalValue) if (tokenRef?.value) { color = tokenRef.value diff --git a/sandbox/vite/panda.config.ts b/sandbox/vite/panda.config.ts index 8005662..1f2002b 100644 --- a/sandbox/vite/panda.config.ts +++ b/sandbox/vite/panda.config.ts @@ -17,6 +17,11 @@ export default defineConfig({ recipes: { button, }, + tokens: { + lineHeights: { + normal: { value: 1.4 } + } + }, semanticTokens: { colors: { danger: { diff --git a/sandbox/vite/src/App.tsx b/sandbox/vite/src/App.tsx index 02c3171..a027d9b 100644 --- a/sandbox/vite/src/App.tsx +++ b/sandbox/vite/src/App.tsx @@ -32,6 +32,7 @@ function App() { margin: '2rem', padding: '4', fontSize: '2xl', + lineHeight: 'normal' })} > Hello from Panda !