From 99621d22c75bcefdaeceb611381b77b3471d7de7 Mon Sep 17 00:00:00 2001 From: Akul Mehta <42812604+akulmehta@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:36:46 -0500 Subject: [PATCH] Updating docs to add a Note for Tailwind CSS when using custom theme --- docs/expanding-powergrid/custom-theme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/expanding-powergrid/custom-theme.md b/docs/expanding-powergrid/custom-theme.md index de64de4..5283434 100644 --- a/docs/expanding-powergrid/custom-theme.md +++ b/docs/expanding-powergrid/custom-theme.md @@ -211,3 +211,24 @@ class DishTable extends PowerGridComponent return \App\PowerGridThemes\BigFonts::class; } ``` + +## Note for Tailwind CSS + +When using Tailwind CSS you may need to add your custom theme file to your Tailwind configuration as a content in order to scan your file for classes during the build process. The following shows an example of how to do so when using the above `app\PowerGridThemes\BigFonts.php` file as an example. + +1. Add the following file to your `tailwind.config.js` in the `content` key: + +```js +module.exports = { + ... + + content: [ + '...', + './app/PowerGridThemes/BigFonts.php', // replace with path to your custom theme [!code ++] + ], + + ... +} +``` + +2. Rebuild your assets using `npm run build` or `npm run dev`. \ No newline at end of file