giuseppeg / styled-jsx-postcss

Use PostCSS with styled-jsx 💥
MIT License
64 stars 11 forks source link

Can't get styled-jsx-postcss working with postcss-cssnext #17

Closed Tomekmularczyk closed 7 years ago

Tomekmularczyk commented 7 years ago

I might be missing something obvious here but I'm trying to use this library with postcss-next and cant get it working like in example below.

export default class App extends React.Component {
  render() {
    return (
      <div class="App">
         YEAH, REACT
        <img src="/static/company-logo.png" alt=""/>
        <Link to="/notknown">Go to 404 page</Link>
        <style jsx>{`
          .App {
            img {
              margin-top: 200px;
            }
          }
        `}</style>
      </div>
    );
  }
}

heres link to the repo and branch on which I tried to configure it. https://github.com/Tomekmularczyk/react-starter/tree/styled-jsx-postcss

EDIT:

I found out that when nesting with cssnext I should use & character...