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

[Bug] Small typo in cardBodyStyle.jsx Line 39 #41

Closed
ericsolberg opened this issue Jun 29, 2019 · 1 comment
Closed

[Bug] Small typo in cardBodyStyle.jsx Line 39 #41

ericsolberg opened this issue Jun 29, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@ericsolberg
Copy link

Version

1.7.0

Reproduction link

hupe1980/gatsby-plugin-material-ui#31

Steps to reproduce

Please note that you have a small typo on line 39 of cardbodystyle.jsx ... the 'h1, h2, h3' subselector is missing the '&'.

For some reason this didn't show up during development. I'm using Gatsby and it only showed up when I'm using the gatsby-plugin-material-ui plugin, and then do a production build. It complained of an invalid word in CSS, and through process of elimination, I figured out the error was on this line of code...

  cardBodyColor: {
    borderRadius: '6px',
    '&': {
      'h1, h2, h3': { // <- Line 39 should be '& h1, h2, 3'
        '& small': {
          color: 'rgba(' + hexToRgb(whiteColor) + ', 0.8)'
        }
      }
    }
  }

What is expected?

The subselector should start with '&'

What is actually happening?

There's no '&'


Solution

Add an ampersand to line 39

cardBodyColor: {
    borderRadius: '6px',
    '&': {
      '& h1, h2, h3': { // <- fixed
        '& small': {
          color: 'rgba(' + hexToRgb(whiteColor) + ', 0.8)'
        }
      }
    }
  }

Additional comments

If this fix is incorrect, please let me know!

@einazare
Copy link
Contributor

einazare commented Jul 1, 2019

Hello there, @ericsolberg ,

Thank you for your interest in working with our product and for sharing with us this bug.
I believe in one of the material-ui updates, they've made some changes on the way jss is compiled to css, since that line worked some versions back.
Anyway, your fix works beautifully. Once again thank you.

Best,
Manu

@einazare einazare added the bug Something isn't working label Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants