Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating docs to add a Note for Tailwind CSS when using custom theme #125

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`.