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

Compatibility with other css in js solutions? #1

Open
jrmyio opened this issue Apr 4, 2018 · 1 comment
Open

Compatibility with other css in js solutions? #1

jrmyio opened this issue Apr 4, 2018 · 1 comment

Comments

@jrmyio
Copy link

jrmyio commented Apr 4, 2018

Hey!

The feature list of your library seems really interesting. I was wondering if this library can work together other css in js solutions, for example Styledcomponents.

Any examples in the docs could help others that try to figure out if they can use this library in their existing workflow.

@tomhodgins
Copy link
Owner

tomhodgins commented Apr 4, 2018

Thanks for checking this out! JS-in-CSS pattern does basically three things:

  • create a new <style> tag in the browser for each unique jsincss stylesheet you use
  • listen to specific events in the browser, whether on window or specific elements
  • reprocess the jsincss stylesheet at that time and populate the <style> tag in the document with the current output of that stylesheet

It's like real-time stylesheet templating via JS to help you use selectors and values in your styles that CSS can't normally reach.

So.....you ought to be able to use StyledComponents, or any other tools you want to compose whatever stylesheets you want, If you were using both CSS-in-JS I would think that adding jsincss to your workflow would sit somewhere between the output of that and the browser your site is being viewed in.

Are there any particular features or jsincss plugins you wanted to use?

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