Using Tailwind CSS Styles in Markdown/MDX content w/@next/mdx? #10147
-
Hi, I have this in my
and I'm using tailwindcss, imported into the global style sheet, set it up as they instructed, etc. But the styles aren't being applied to my markdown content. I sense that there might be something limiting me, idk, is there anyway to get around this? I know I could wrap the content in a container with Help would be kindly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
Check that the |
Beta Was this translation helpful? Give feedback.
-
I found the problem. I changed my tailwind configuration from this:
to this:
A single space between the ',' and 'mdx' was breaking things 🤦♂️ |
Beta Was this translation helpful? Give feedback.
-
You should also use "text-blue-100", not text-100-blue :) |
Beta Was this translation helpful? Give feedback.
-
I am facing the same issue |
Beta Was this translation helpful? Give feedback.
-
For anyone having the same problem as I did on Next.js with the app router. I had to change:
to
The problem was that |
Beta Was this translation helpful? Give feedback.
-
I had a similar issue, I had a glob like this: content: ["./posts/**/*.{mdx}", "./src/**/*.{ts,tsx}"] But removing the curly braces around content: ["./posts/**/*.mdx", "./src/**/*.{ts,tsx}"] |
Beta Was this translation helpful? Give feedback.
I found the problem. I changed my tailwind configuration from this:
to this:
A single space between the ',' and 'mdx' was breaking things 🤦♂️