KyleAMathews / typography.js

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

Injecting CSS reset before typography.js styles in Gatsby? #253

Open kylegillen opened 4 years ago

kylegillen commented 4 years ago

Hi.

I'm using Tailwind CSS in conjunction with typography.js via the official plugin. I want to use tailwind's base styles and want typography to overwrite the styles thereafter.

The issue being that both in development and production, typography inserts itself as the first style component in the head tag.

I currently import tailwind in the gatsby-browser file, but as typography seems to append itself at the very top of the head tag, there's seemingly no entry point in the gatsby build process that I can tap into to add another css file above typography.

Can anyone outline how I could influence the build ordering, or provide an alternative solution that would let me import the reset before typography injects its styles?

I tried the suggestions in issue #180 to no avail due to the dynamic nature of typography.js via the gatsby plugin.

AdamQuadmon commented 4 years ago

Any luck with this? I'm also looking at tailwind + typography

mikevercoelen commented 3 years ago

Same issue here