KyleAMathews / typography.js

A powerful toolkit for building websites with beautiful design
http://kyleamathews.github.io/typography.js/
MIT License
3.84k stars 182 forks source link

Use rhythm in css modules #192

Closed dpyzo0o closed 5 years ago

dpyzo0o commented 5 years ago

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?

dpyzo0o commented 5 years ago

Anyone can help?

KyleAMathews commented 5 years ago

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.

aaronaustin commented 5 years ago

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?

KyleAMathews commented 5 years ago

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