KyleAMathews/typography.js

Use rhythm in css modules

dpyzo0o opened this issue · 4 comments

After reading the doc, I know that rhythm can be imported and used in inline styles and css-in-js. What if I want to use it in css modules? Any suggestions?

Anyone can help?

Unfortunately no one has built an integration yet. It should be possible to build integration w/ Sass and PostCSS so would love to see that! An integration would need to read the typography.js config and then generate variables/functions which work with other CSS systems.

I’m interested in this as well. The need has presented itself several times. I’ve not attempted an integration like this before. @KyleAMathews, is there a starting point you could recommend to see how it might be done?

You'd need to have a node.js script which writes out a variables file that you can include in other sass files.