Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove extraneous classes on nested styled composition #2341

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

astahmer
Copy link
Collaborator

@astahmer astahmer commented Mar 9, 2024

Closes #2330

📝 Description

Fix nested styled factory composition

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 */}
      <BasicBox>text1</BasicBox>
      {/* ✅ fs_20px */}
      <ExtendedBox1>text2</ExtendedBox1>
      {/* BEFORE: ❌ fs_10px fs_30px */}
      {/* NOW: ✅ fs_30px */}
      <ExtendedBox2>text3</ExtendedBox2>
    </>
  )
}

📝 Additional Information

follow up to #2192

Copy link

changeset-bot bot commented Mar 9, 2024

🦋 Changeset detected

Latest commit: 1e0bbe9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@pandacss/generator Patch
@pandacss/studio Patch
@pandacss/fixture Patch
@pandacss/node Patch
@pandacss/parser Patch
@pandacss/astro-plugin-studio Patch
@pandacss/dev Patch
@pandacss/postcss Patch
@pandacss/config Patch
@pandacss/core Patch
@pandacss/extractor Patch
@pandacss/is-valid-prop Patch
@pandacss/logger Patch
@pandacss/preset-atlaskit Patch
@pandacss/preset-base Patch
@pandacss/preset-open-props Patch
@pandacss/preset-panda Patch
@pandacss/shared Patch
@pandacss/token-dictionary Patch
@pandacss/types Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Mar 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
panda-docs ✅ Ready (Inspect) Visit Preview Mar 9, 2024 10:14pm
panda-playground ✅ Ready (Inspect) Visit Preview Mar 9, 2024 10:14pm
panda-studio ✅ Ready (Inspect) Visit Preview Mar 9, 2024 10:14pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated classes in extended components
2 participants