@pandacss/config
Advanced tools
Changelog
[0.42.0] - 2024-07-08
4xl
border radius tokenclassName
to be optional, both for recipes
and slotRecipes
, with a fallback to its name.panda analyze --output coverage.json
fileimport { defineConfig } from '@pandacss/core'
export default defineConfig({
recipes: {
button: {
className: 'button', // 👈 was mandatory, is now optional
variants: {
size: {
sm: { padding: '2', borderRadius: 'sm' },
md: { padding: '4', borderRadius: 'md' },
},
},
},
},
})
[BREAKING] Removed the legacy config.optimize
option because it was redundant. Now, we always optimize the generated
CSS where possible.
BREAKING: Remove emitPackage
config option,
tldr: use importMap
instead for absolute paths (e.g can be used for component libraries)
emitPackage
is deprecated, it's known for causing several issues:
node_modules
, leading to panda codegen
updates to the styled-system
not
visible in the browserAs alternatives, you can use:
../styled-system/css
instead of styled-system/css
)#styled-system/css
instead of styled-system/css
https://nodejs.org/api/packages.html#subpath-imports@acme/styled-system
) and use
importMap: "@acme/styled-system"
so that Panda knows which entrypoint to extract, e.g.
import { css } from '@acme/styled-system/css'
https://panda-css.com/docs/guides/component-libraryChangelog
[0.41.0] - 2024-06-16
Fix an issue where spreading an identifier in a sva slots
array would prevent expected CSS from being generated
import { sva } from 'styled-system/css'
const parts = ['positioner', 'content']
const card = sva({
slots: [...parts], // <- spreading here was causing the below CSS not to be generated, it's now fixed ✅
base: {
root: {
p: '6',
},
},
})
Annotate config recipe default variants with the @default
js doc comment. This makes it easy to know the default value
of a variant.