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

jss 10.0.0-alpha.8 creates issue with Material-ui/CssBaseline #14251

Closed
antokara opened this issue Jan 19, 2019 · 1 comment
Closed

jss 10.0.0-alpha.8 creates issue with Material-ui/CssBaseline #14251

antokara opened this issue Jan 19, 2019 · 1 comment
Labels

Comments

@antokara
Copy link
Contributor

antokara commented Jan 19, 2019

Expected Behavior 🤔

import CssBaseline from "@material-ui/core/CssBaseline";
and rendering the should
"inject" a style tag MuiCssBaseline in the head, which contains css rules

<style data-jss="" data-meta="MuiCssBaseline"> ...css rules </style>

Current Behavior 😯

The "injected" style tag MuiCssBaseline in the head is empty

<style data-jss="" data-meta="MuiCssBaseline"> </style>

Steps to Reproduce 🕹

Link:
https://codesandbox.io/s/rm3r2vrmxn

  1. Just run and inspect DOM or look at the body margin and the red background color
  2. You may also inspect the head for <style data-jss="" data-meta="MuiCssBaseline"> and look that it is empty

Context 🔦

downgrading to jss 10.0.0-alpha.7 or removing it, fixes the issue.
apparently, this removes all base css, including resetting body margin to zero.

I know this is an alpha package of the jss but I thought reporting the issue to help with the future stable release. Unfortunately, I do not have the time to find exactly what causes it other than my initial guess that it could be related to cssinjs/jss#934

Your Environment 🌎

"@material-ui/core": "3.9.0",
"jss": "10.0.0-alpha.8",
"prop-types": "latest",
"react": "latest",
"react-dom": "latest",
"react-scripts": "latest"

@joshwooding
Copy link
Member

Hi, @material-ui/core doesn't support the new version of jss. If you want to use it you will need to use @material-ui/styles. https://codesandbox.io/s/81zp96qy2j

Nevertheless, thanks for letting us know 😄

@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 20, 2022
@zannager zannager added component: CssBaseline The React component v3.x and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants