Skip to content
Open
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
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,30 @@ let liveSocket = new LiveSocket('/live', Socket, {
})
```

Then, add `'../deps/live_toast/lib/**/*.*ex'` to your list of paths Tailwind will look for class names, in your
`tailwind.config.js`:
Then, add the path to the `live_toast` dependency to your list of paths Tailwind will look for class names. This depends on the Tailwind version you are using.

<!-- tabs-open -->

### Tailwind CSS v4

Use this instruction if you use the CSS-first configuration of Tailwind. If your project still has a `tailwind.config.js` file, look for the Tailwind CSS v3 instruction.

In your CSS file:

```css
/* assets/css/app.css */

/* add this line */
@source "../../deps/live_toast/lib/**/*.*ex";
```

**Note:** The path uses `../../` because CSS files are typically in `assets/css/`.

### Tailwind CSS v3

Use this instruction if your project has a `tailwind.config.js` file.

In your `tailwind.config.js` file:

```javascript
// assets/tailwind.config.js
Expand All @@ -78,12 +100,15 @@ module.exports = {
'./js/**/*.js',
'../lib/your_app_web.ex',
'../lib/your_app_web/**/*.*ex',
// add this line
'../deps/live_toast/lib/**/*.*ex',
]
}
```

Your particular file will look different but all you need to do is make sure the last line is there.
<!-- tabs-close -->

Your particular files will look different but all you need to do is make sure the path is there.

> **Note for Umbrella Apps:**
> If you're using an umbrella application, your paths above may look different. You'll probably have an extra folder in
Expand Down