cssinjs / styled-jss

Styled Components on top of JSS.
http://cssinjs.org/styled-jss
MIT License
217 stars 25 forks source link

Add plugins without re-exporting styled #56

Closed goodmind closed 6 years ago

goodmind commented 6 years ago

Is this possible to add jss plugins without re-exporting whole styled-jss module?

lttb commented 6 years ago

hm, in the beginning, we thought that it would be better to provide jss customization by createStyled function as in the example in the readme.

but maybe it would be okay to provide jss instance with styled function like styled.jss, so with that you will have an ability to add plugins this way: styled.jss.use(vendorPrefixer())

what do you think?

goodmind commented 6 years ago

@lttb looks ok

lttb commented 6 years ago

@goodmind released in 2.1.1, hope it helps

goodmind commented 6 years ago

@lttb is this supposed to work like this? Nested selector didn't add to stylesheet https://www.webpackbin.com/bins/-Ky6Kf7GAuosMZ5Jm1z4

lttb commented 6 years ago

@goodmind it looks like that jss-isolate does not apply for cascaded selectors by adding a Rule with addRule (https://www.webpackbin.com/bins/-Ky6UVkomYxYn8mUF4cu)

lttb commented 6 years ago

opened an issue: https://github.com/cssinjs/jss/issues/619