Rebass: Theme spacing doesn't work on the new version of emotion-theming

Created on 14 Nov 2020  路  5Comments  路  Source: rebassjs/rebass

Theme spacing doesn't work on the @emotion/react (new version of emotion-theming) theme provider.

Most helpful comment

I believe this is because you're providing context via @emotion/react -> ThemeProvider but Rebase still gets context from emotion-theming -> ThemeProvider. Those are two different contexts :(

This will require a major version bump for rebass but we haven't seen any release at all for over a year. I'm worried that this might never happen.

All 5 comments

Check this issue on this sandbox link. (The padding value were expected to be equal to 1rem)
https://codesandbox.io/s/trusting-tdd-os292?file=/src/App.js

I believe this is because you're providing context via @emotion/react -> ThemeProvider but Rebase still gets context from emotion-theming -> ThemeProvider. Those are two different contexts :(

This will require a major version bump for rebass but we haven't seen any release at all for over a year. I'm worried that this might never happen.

I think I have the same issue. I get this error in my Next.js application:

Error: The @emotion/core package has been renamed to @emotion/react. Please import it like this import { jsx } from '@emotion/react'.

in _api.js I have this import:

import {ThemeProvider} from '@emotion/react'

@emotion/react is not compatible with the current version of emotion.

https://github.com/rebassjs/rebass/pull/1051

I can't use emotion-theming because there isn't typescript support or type definitions for it, so that's why I've tried to use @emotion/react. However, this doesn't import the theme at all... same issue here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jckw picture jckw  路  6Comments

hellais picture hellais  路  7Comments

contra picture contra  路  5Comments

borisyordanov picture borisyordanov  路  7Comments

steida picture steida  路  4Comments