Styled-jsx: resolveScopedStyles include in API

Created on 7 Jan 2018  路  4Comments  路  Source: vercel/styled-jsx

Hi @giuseppeg

what do you think about embed the resolveScopedStyles function from https://github.com/zeit/styled-jsx/issues/273 in the library.
So users can import it when needed?

Like

import {resolveScopedStyles} from 'styled-jsx'

?

All 4 comments

@pungggi it is a few lines utility that can be implemented by the users. I don't think that it is necessary to include it in the library.

@giuseppeg I think this could be really useful to be added as a template tag function, something like thirdPartyCss.

@giuseppeg I disagree, when you find online examples using resolveScopedStyles but have no idea where it came and relentlessly try to import it like import {resolveScopedStyles} from 'styled-jsx', but because there is no export at styled-jsx you end up thinking it's not correctly installed and reinstall all node packages, to finally figure out it's non-provided.

In v3 we are adding the following syntax:

const { className, styles } = css.resolve`div { color: red }`

to do the same thing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

soulchainer picture soulchainer  路  5Comments

straxico picture straxico  路  4Comments

anderseide picture anderseide  路  5Comments

igor-ribeiro picture igor-ribeiro  路  3Comments

etiennejcharles picture etiennejcharles  路  3Comments