You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When switching to Tailwind 4 the config file is gone.
Since the .vitepress directory and all its contents is not in a .gitignore all the markdown files should be parsed.
The CSS now looks like this
@import'tailwindcss';
@theme { ... }
but the resulting CSS provided by Vite does not contain a .bg-amber-900 class.
Adding
@source './docs/**/*.md';
doesn't change anything - the resulting CSS provided by Vite does not contain a .bg-amber-900 class.
What version of Tailwind CSS are you using?
4.0.1
What build tool (or framework if it abstracts the build tool) are you using?
vite
What version of Node.js are you using?
22.13.1
What browser are you using?
Firefox
What operating system are you using?
Ubuntu 24.04.1
Describe your issue
With Tailwind 3.4.x I can incorporate Tailwind classes in my Vitepress markdown files. My tailwind.config.js looks like this
One of the markdown files contains a
and Vite delivers a stylesheet containing
When switching to Tailwind 4 the config file is gone.
Since the .vitepress directory and all its contents is not in a .gitignore all the markdown files should be parsed.
The CSS now looks like this
but the resulting CSS provided by Vite does not contain a
.bg-amber-900
class.Adding
doesn't change anything - the resulting CSS provided by Vite does not contain a
.bg-amber-900
class.package.json
vite.config.js
Expected behavior:
Tailwind 4.0 should also generate stylesheets containing classes used in Vitepress markdown files.
The text was updated successfully, but these errors were encountered: