Skip to content

Commit

Permalink
Merge pull request #125 from akulmehta/custom-theme-tailwind-css-note
Browse files Browse the repository at this point in the history
Updating docs to add a Note for Tailwind CSS when using custom theme
  • Loading branch information
luanfreitasdev authored Nov 29, 2024
2 parents fb78855 + 99621d2 commit 42673d0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/expanding-powergrid/custom-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

0 comments on commit 42673d0

Please sign in to comment.