giuseppeg / giuseppeg/styled-jsx-postcss

Support for keeping CSS in separate files

Open
#22 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
64
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Is [this feature](https://github.com/zeit/styled-jsx#keeping-css-in-separate-files) currently supported?

I have the following in my `styles.js`:

```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

```js
import styles from './styles'
...

{ styles }

```

I end up getting the following error:

```
Syntax Error: {`some css`}), but got Identifier
```

My guess would be that it probably happens because [external StyleSheets support](https://github.com/zeit/styled-jsx/pull/148) 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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.