diff --git a/.changeset/few-dragons-retire.md b/.changeset/few-dragons-retire.md new file mode 100644 index 0000000000..73f81cbc83 --- /dev/null +++ b/.changeset/few-dragons-retire.md @@ -0,0 +1,28 @@ +--- +'@pandacss/generator': patch +'@pandacss/studio': patch +--- + +Fix nested `styled` factory composition + +```tsx +import { styled } from '../styled-system/jsx' + +const BasicBox = styled('div', { base: { fontSize: '10px' } }) +const ExtendedBox1 = styled(BasicBox, { base: { fontSize: '20px' } }) +const ExtendedBox2 = styled(ExtendedBox1, { base: { fontSize: '30px' } }) + +export const App = () => { + return ( + <> + {/* ✅ fs_10px */} + text1 + {/* ✅ fs_20px */} + text2 + {/* BEFORE: ❌ fs_10px fs_30px */} + {/* NOW: ✅ fs_30px */} + text3 + + ) +} +```