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

Support for keeping CSS in separate files #22

Open
ythecombinator opened this issue Jul 11, 2017 · 1 comment
Open

Support for keeping CSS in separate files #22

ythecombinator opened this issue Jul 11, 2017 · 1 comment

Comments

@ythecombinator
Copy link

Is this feature currently supported?

I have the following in my styles.js:

const styles = `

@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro');
@import url(//fonts.googleapis.com/css?family=Fira+Sans:300);

html, body {
  margin: 0;
  padding: 0; }

...
  
`
export default styles

And when I try to import it in my component via

import styles from './styles'
...
    <style jsx>
      { styles }
    </style>

I end up getting the following error:

Syntax Error: <style jsx>{`some css`}</style>), but got Identifier

My guess would be that it probably happens because external StyleSheets support came after this package's last update–which still sounds strange since you authored the PR on styled-jsx 😄 .

Any ideas on what's happening?

@giuseppeg
Copy link
Owner

yep this packages is using 0.5.7 so unfortunately external styles are not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants