Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I use @tailwindcss/typography? #2

Open
firedev opened this issue Sep 8, 2023 · 2 comments
Open

How do I use @tailwindcss/typography? #2

firedev opened this issue Sep 8, 2023 · 2 comments

Comments

@firedev
Copy link

firedev commented Sep 8, 2023

Hi. Tried to add it to package.json and postcss.config.js but class="prose" did nothing.

diff --git a/package.json b/package.json
index cd100f4..1ef612a 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
   },
   "dependencies": {
+    "@tailwindcss/typography": "^0.5.10",
   }
 }

and

diff --git a/postcss.config.js b/postcss.config.js
index bd5099c..617c814 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -1,10 +1,15 @@
 module.exports = {
   plugins: {
-    'tailwindcss': {},
+    "tailwindcss": {
+      plugins: [
+        require("@tailwindcss/typography"),
+        // ...
+      ],
+    },
   "postcss-flexbugs-fixes": {},
   "postcss-preset-env": {
       autoprefixer: {
       flexbox: 'no-2009'
       flexbox: "no-2009"
       },
       stage: 2
     }
@malachaifrazier
Copy link

Did you ever figure this out?

@firedev
Copy link
Author

firedev commented Sep 14, 2023

@malachaifrazier just made it myself:

h1, .h1 {
    @apply text-4xl font-bold mb-4 mt-8;

  }
  h2, .h2 {
    @apply text-3xl font-bold mb-3 mt-6;
  }
  h3, .h3 {
    @apply text-2xl font-bold mb-2 mt-4;
  }

  code {
    @apply px-4 py-2 font-bold;
  }

  p {
    @apply mb-4;
  }

  ul, ol {
    @apply mb-4;
  }
  
  ol {
    @apply list-decimal mb-4 ml-8;
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants