Patch Changes
-
2645c2d: > Note: This is only relevant for users using more than 1 custom defined preset that overlap with each
other.BREAKING CHANGE: Presets merging order felt wrong (left overriding right presets) and is now more intuitive (right
overriding left presets)Example:
const firstConfig = definePreset({ theme: { tokens: { colors: { 'first-main': { value: 'override' }, }, }, extend: { tokens: { colors: { orange: { value: 'orange' }, gray: { value: 'from-first-config' }, }, }, }, }, }) const secondConfig = definePreset({ theme: { tokens: { colors: { pink: { value: 'pink' }, }, }, extend: { tokens: { colors: { blue: { value: 'blue' }, gray: { value: 'gray' }, }, }, }, }, }) // Final config export default defineConfig({ presets: [firstConfig, secondConfig], })
Here's the difference between the old and new behavior:
{ "theme": { "tokens": { "colors": { "blue": { "value": "blue" }, - "first-main": { - "value": "override" - }, "gray": { - "value": "from-first-config" + "value": "gray" }, "orange": { "value": "orange" }, + "pink": { + "value": "pink", + }, } } } }
-
Updated dependencies [26a788c]
- @pandacss/types@0.15.2
- @pandacss/preset-base@0.15.2
- @pandacss/preset-panda@0.15.2
- @pandacss/error@0.15.2
- @pandacss/logger@0.15.2