vercel / styled-jsx

Full CSS support for JSX without compromises
http://npmjs.com/styled-jsx
MIT License
7.65k stars 266 forks source link

Unable to integrate with animated element of react-spring. #817

Closed artidataio closed 1 year ago

artidataio commented 1 year ago

Do you want to request a feature or report a bug?

I think that it is a bug.

What is the current behavior?

I tried to reproduce this is issue in the following sandbox. The problem is whenever I'm using <style jsx> to style animated element of react spring, the corresponding element doesn't get the correct injected class. It is missing the jsx-<hash number> class. As a result the styling doesn't get mapped to the element.

I think that react-spring animated element itself does seeem to support className. As you can see in this sandbox, it gets the correct style as written in <style> . Hence I'm filing the issue here.

What is the expected behavior?

I expect the animated element to get the correct injected class, hence correct styling.

artidataio commented 1 year ago

Current work around is using the resolve tag, see sandbox. I guess this is the proper way to style from third party component library, hence I'm closing the issue.