2

How to enable Official Tailwind Plugins while using astrojs/tailwind?

I have installed the typography plugin, restarted the server, and refreshed the browser. But I still have a small H1 heading.

  • npm install -D @tailwindcss/typography
  • Then I've added require('@tailwindcss/typography') to my tailwind.config.js

My package.json is ...


 "devDependencies": {
    "@astrojs/tailwind": "^0.2.5",
    "@tailwindcss/typography": "^0.5.4",
Cem Kaan
  • 2,086
  • 1
  • 24
  • 55

1 Answers1

1

Yes, using @astro/tailwind with official tailwind plugins is possible.

My mistake was to use H1 tags without prose class.

I did not use a top div with prose class. After adding prose class it worked.

        <div class="prose prose-slate mx-auto">
          <h1>Your Header</h1>
        </div>
Cem Kaan
  • 2,086
  • 1
  • 24
  • 55