Closed maclong9 closed 9 months ago
Chiming in to say I ran into this yesterday too after updating.
My accentColor
and grayColor
were not automatically included. I had to redundantly list them in the additionalColors
array.
This config
export default defineConfig({
preflight: true,
presets: [
'@pandacss/preset-base',
createPreset({
grayColor: 'slate',
accentColor: 'indigo',
borderRadius: 'sm'
})
],
include: ['./src/**/*.{js,jsx,ts,tsx}'],
exclude: [],
jsxFramework: 'react',
outdir: 'styled-system',
theme: { ... },
staticCss: { ... }
})
results in these errors
○ Compiling / ...
🐼 warn [config] ⚠️ Invalid config:
- [tokens]: Missing token: `colors.slate.9` used in `config.semanticTokens.colors.gray.default`
- [tokens]: Missing token: `colors.slate.10` used in `config.semanticTokens.colors.gray.emphasized`
- [tokens]: Missing token: `colors.slate.12` used in `config.semanticTokens.colors.gray.text`
- [tokens]: Missing token: `colors.indigo.9` used in `config.semanticTokens.colors.accent.default`
- [tokens]: Missing token: `colors.indigo.10` used in `config.semanticTokens.colors.accent.emphasized`
- [tokens]: Missing token: `colors.indigo.a11` used in `config.semanticTokens.colors.accent.text`
Adding them fixes it.
additionalColors: ['slate', 'indigo'],
"@ark-ui/react": "2.0.2",
"@pandacss/dev": "0.30.2",
"@park-ui/panda-preset": "0.34.0",
@lee-reinhardt @lee-reinhardt
Fixed in 0.34.1
See Panda Nextjs example: https://stackblitz.com/github/cschroeter/park-ui/tree/main/examples/panda/react/next-js?file=panda.config.ts
@cschroeter absolutely beautiful, thank you!
@cschroeter I still get this error in 0.34.1
:
🐼 warn [config] ⚠️ Invalid config:
- [tokens] Missing token: `colors.white` used in `config.semanticTokens.colors.indigo.fg`
- [tokens] Missing token: `colors.white` used in `config.semanticTokens.colors.slate.fg`
- [tokens] Missing token: `colors.white` used in `config.semanticTokens.colors.gray.fg`
- [tokens] Missing token: `colors.white` used in `config.semanticTokens.colors.accent.fg`
- [tokens] Missing token: `colors.white` used in `config.semanticTokens.colors.bg.default`
My config looks like this (I'm not using white
anywhere in it):
presets: [
'@pandacss/preset-base',
createPreset({
accentColor: 'indigo',
grayColor: 'slate',
borderRadius: 'sm',
}),
],
See I thought this and that's what my original issue was about, it works fine if I have
additionalColors: ['*']
Otherwise
With configuration:
Originally posted by @mac-codes9 in https://github.com/cschroeter/park-ui/issues/228#issuecomment-1937769793