Skip to content

Commit 88bfe8a

Browse files
[8.x] Add note for pagination Tailwind JIT compatibility (laravel#7656)
* add note for Tailwind JIT compatibility if using the default pagination views, we need to make sure the necessary Tailwind classes are compiled, so we'll add a note to show how to do this. * Update pagination.md Co-authored-by: Taylor Otwell <[email protected]>
1 parent 76d29dc commit 88bfe8a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pagination.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,21 @@
2020

2121
In other frameworks, pagination can be very painful. We hope Laravel's approach to pagination will be a breath of fresh air. Laravel's paginator is integrated with the [query builder](/docs/{{version}}/queries) and [Eloquent ORM](/docs/{{version}}/eloquent) and provides convenient, easy-to-use pagination of database records with zero configuration.
2222

23-
By default, the HTML generated by the paginator is compatible with the [Tailwind CSS framework](https://tailwindcss.com/); however, Bootstrap pagination support is also available.
23+
By default, the HTML generated by the paginator is compatible with the [Tailwind CSS framework](https://tailwindcss.com/); however, Bootstrap pagination support is also available.
24+
25+
<a name="tailwind-jit"></a>
26+
#### Tailwind JIT
27+
28+
If you are using Laravel's default Tailwind pagination views and the Tailwind JIT engine, you should ensure your application's `tailwind.config.js` file's `content` key references Laravel's pagination views so that their Tailwind classes are not purged:
29+
30+
```js
31+
content: [
32+
'./resources/**/*.blade.php',
33+
'./resources/**/*.js',
34+
'./resources/**/*.vue',
35+
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
36+
],
37+
```
2438

2539
<a name="basic-usage"></a>
2640
## Basic Usage

0 commit comments

Comments
 (0)