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

Panda gets styles from 3rd party CSS function #3089

Open
1 of 3 tasks
literalpie opened this issue Jan 10, 2025 · 1 comment
Open
1 of 3 tasks

Panda gets styles from 3rd party CSS function #3089

literalpie opened this issue Jan 10, 2025 · 1 comment

Comments

@literalpie
Copy link

Description

When I generate panda CSS in a project that uses a mix of emotion css functions and panda css functions, I expect it to only use the panda css styles, but it also picks up emotion css styles.

Link to Reproduction

https://play.panda-css.com/S0BSaf1PHV

Steps to reproduce

  1. Open the playground, and the "CSS output" tab at the bottom
  2. Notice that width: '123px' is only used in a non-panda css function, but it is getting added to the CSS output.

JS Framework

No response

Panda CSS Version

0.51.1

Browser

No response

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

CVA works as expected, so I'm hopeful it is possible to do this how I expect.

I believe isRawFn is the culprit because it returns true if the name === 'css' regardless of the import.

@kris-ellery
Copy link

We have noticed something similar with styled-components and ended up disabling it via cssProp: false in the babel plugin.

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

No branches or pull requests

2 participants