Having @emotion/styled in my deps breaks all styling
See original GitHub issueBug report
Describe the bug
If I have @emotion/styled
in my dependencies - even if I don’t import it, I chakra-ui components have no stylings. Precisely, every styled-system props is kept as-is and ends-up in the css - and is obviously invalid.
To reproduce
start a project with the latest chakra-ui (tested with rc 5, 6 and 8) and latest @emotion-styled (10.0.27). Tested with CRA 4 and latest 3.x
Expected behavior
I should be able to use @emotion/styled in my project alongside chakra-ui
Screenshots
see https://github.com/chakra-ui/chakra-ui/discussions/2409
System information
- OS: ubuntu
- Browser (if applies):Chrome
- Version of @chakra-ui/core: rc 5, 6 and 8
- Version of Node.js: 12 something
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:34 (16 by maintainers)
Top Results From Across the Web
Styled Components
styled is a way to create React components that have styles attached to them. ... this allows you to change the styles of...
Read more >Why We're Breaking Up with CSS-in-JS
While I have not measured this, I believe one of the most significant factors in how Emotion performs is whether style serialization is...
Read more >Module not found: Error: Can't resolve '@emotion/styled ...
This is an issue caused by the break name change of emotion 11. So far storybook internally is still looking for the v10...
Read more >FAQs
styled -components v5 does not introduce any breaking public API changes, and adds the following: Total rewrite of the core stylesheet engine, ...
Read more >@emotion/styled | Yarn - Package Manager
Emotion 10 is a big change that we're really excited about with improvements to the css prop, a Global component for dynamic global...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I feel this issue is going slightly off-topic.
Chakra-ui
is a very customizable ui-kit based on emotion and styled-system. It’s not a styling library. If at any given time the use of Chakra is preventing user from using emotion or emotion-styled, this is an issue and should be fixed. A user should be able to use whatever css-in-js solution he wants to use, from Radium to Stitches or Styled-components, alongside chakra-ui. I’d rather have emotion as peer-dep with a hard version number if needed, or the compatible version clearly stated in the doc maybe ?@ljosberinn on a side note, Table would be pretty neat !
Here’s a code pen I made with an example of this bug https://codesandbox.io/s/homepage-forked-5l6hj