rebass icon indicating copy to clipboard operation
rebass copied to clipboard

@emotion/react ThemeProvider not working

Open marcoamonteiro opened this issue 4 years ago • 2 comments

To reproduce:

Simple example from the rebass documentation and create-react-app: https://rebassjs.org/getting-started

import React from 'react';
import './App.css';
import {Heading} from 'rebass'
import { ThemeProvider } from '@emotion/react'
import styled from '@emotion/styled'

const theme = ...

function App() {
  return (
      <ThemeProvider theme={theme}>
        <div className="app">
          <Heading fontSize={7}>Hello</Heading>
        </div>
      </ThemeProvider>
  );
}

Expected behavior:

Theme is not applied to Rebass components

Environment information:

  • react version: 4.0
  • @emotion/react version: 11.4

marcoamonteiro avatar Jun 08 '21 17:06 marcoamonteiro

Instead of @emiton/react, emotion-theming": "^10.0.27" does work for me, though I agree the behavior is not intended/poor.

Rebass seems dead though :(

rjerue avatar Jun 12 '21 01:06 rjerue

Same issue with theme-ui provider, styles are not being applied. works with older version of theme-ui

anujmv avatar Feb 02 '22 06:02 anujmv