Repository navigation
Replies: 3 comments 7 replies
|
Yeah, you can use Tailwind with Docusaurus. Then add it to your module.exports = {
plugins: ['docusaurus-tailwindcss'],
};And in your @tailwind base;
@tailwind components;
@tailwind utilities;Here's the NPM package with more details. I also found this guide if you need it as an additional reference. |
6 replies
This comment was marked as spam.
This comment was marked as spam.
|
Here is a full instruction how to install TailwindCSS v4 to Docusaurus v3.10
import type { Plugin, PostCssOptions } from '@docusaurus/types';
export default function tailwindCssPlugin(): Plugin | null {
return {
name: 'tailwindcss-plugin',
configurePostCss(postcssOptions: PostCssOptions) {
postcssOptions.plugins.push(require('@tailwindcss/postcss'));
return postcssOptions;
},
};
}
const config: Config = {
//
plugins: ['./src/plugins/plugin-tailwindcss.ts'],
//
}
@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities);
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));Note
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Can Tailwind CSS be used with Docusaurus? If yes, how can I do that?
Reference #2961
All reactions