Open bnomei opened 6 years ago
the main problem is how @typo
and @vr
should know their context and "bubble up" the @media rule. maybe having postcss-nested could do the trick?
would love to figure out how we could do more vertical rhythm stuff with tailwind. has anyone made personal progress on this?
did anyone move forward with this idea? @bnomei
maybe we can do similar to Bootstrap 4.3? They are using this code https://github.com/twbs/rfs#how-does-it-work
about responsive typography in tailwind... sure one could set it up using the utility classes in some cases. i usually create a component and it get some html parsed content from a cms. like
h1
andp
in example below.i ended up using
@apply
and@screen
but thats a bit of a hassel to get done responsive imho. especially calulating the margin-bottom for vertical rhythm myself.since i am using tailwind as a webpack postcss plugin i can no longer make use of sass mixin typi and its awesome vertical-rhythm function.
what i would love to have instead is something like this.
tailwind.config.js
any tailwind css file
result of @typo-init
the resulting css is what i did before by hand but way shorter and solving the vertical rhythm problem.
maybe tailwind could be enhanced for better responsive typography and vertical rhythm based on typi? or any suggestions how to get it done better using tailwind?