-
-
Notifications
You must be signed in to change notification settings - Fork 355
Open
Description
I would like to add docs about how to use custom TailwindCSS v4 without overriding the theme
some users may have the same question: #682, the solution in https://github.com/bep/hugo-testing-tailwindcss-v4/tree/main may still not be polished and it does not adapt for Hextra.
My current solution:
- Add a
package.jsonwhich includes packagetailwind/postcss, just like https://github.com/imfing/hextra/blob/main/package.json - In
assets/css, addstyles.cssand import original CSS from Hextra:
@import "../../themes/hextra/assets/css/styles.css";
- When adding your own custom TailwindCSS class, you can compile them using
npm run build:css, which is actually running:
npx postcss --config postcss.config.mjs --env production assets/css/styles.css -o assets/css/compiled/main.css
Then done! Your website is rendered with your own custom TailwindCSS class!
Let me know if it is a good idea to add the above to the hextra docs.
Metadata
Metadata
Assignees
Labels
No labels