Skip to content

Commit 42673d0

Browse files
Merge pull request #125 from akulmehta/custom-theme-tailwind-css-note
Updating docs to add a Note for Tailwind CSS when using custom theme
2 parents fb78855 + 99621d2 commit 42673d0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/expanding-powergrid/custom-theme.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,24 @@ class DishTable extends PowerGridComponent
211211
return \App\PowerGridThemes\BigFonts::class;
212212
}
213213
```
214+
215+
## Note for Tailwind CSS
216+
217+
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.
218+
219+
1. Add the following file to your `tailwind.config.js` in the `content` key:
220+
221+
```js
222+
module.exports = {
223+
...
224+
225+
content: [
226+
'...',
227+
'./app/PowerGridThemes/BigFonts.php', // replace with path to your custom theme [!code ++]
228+
],
229+
230+
...
231+
}
232+
```
233+
234+
2. Rebuild your assets using `npm run build` or `npm run dev`.

0 commit comments

Comments
 (0)