Skip to content

Commit ed0dc6d

Browse files
authored
Update installation.md
1 parent 3c7597a commit ed0dc6d

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

docs/installation.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,25 @@
153153

154154
## Optional configurations
155155

156+
### @source directive configuration (for Tailwind CSS v4)
157+
158+
The `content` section from Tailwind CSS v3 has been replaced with the `@source` directive in Tailwind CSS v4.
159+
The `@source` directive is a new way to specify the source files that Tailwind CSS should scan for class names. It's
160+
placed in the `style.css` file.
161+
162+
By default, it looks like this:
163+
164+
```css
165+
@source "../../**/*.{html,py,js}";
166+
```
167+
168+
This means that Tailwind CSS will scan all HTML, Python, and JavaScript files in all directories starting from the
169+
three directories above the `style.css` file. Depending on your project structure, you might need to adjust the
170+
`@source` directive to suit your specific project layout.
171+
172+
For more information about setting `@source`, check out the *"Source Configuration"* page of the Tailwind CSS docs:
173+
[https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources](https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources).
174+
156175
### Content (formerly Purge) rules configuration (for Tailwind CSS v3)
157176
158177
The `content` section of your `tailwind.config.js` file is where you configure the paths to all of your HTML templates,
@@ -187,25 +206,6 @@ HTML files (or files containing HTML content, such as `.vue` or `.jsx` files) ar
187206
For more information about setting `content`, check out the *"Content Configuration"* page of the Tailwind CSS
188207
docs: [https://tailwindcss.com/docs/content-configuration](https://tailwindcss.com/docs/content-configuration).
189208
190-
### @source directive configuration (for Tailwind CSS v4)
191-
192-
The `content` section from Tailwind CSS v3 has been replaced with the `@source` directive in Tailwind CSS v4.
193-
The `@source` directive is a new way to specify the source files that Tailwind CSS should scan for class names. It's
194-
placed in the `style.css` file.
195-
196-
By default, it looks like this:
197-
198-
```css
199-
@source "../../**/*.{html,py,js}";
200-
```
201-
202-
This means that Tailwind CSS will scan all HTML, Python, and JavaScript files in all directories starting from the
203-
three directories above the `style.css` file. Depending on your project structure, you might need to adjust the
204-
`@source` directive to suit your specific project layout.
205-
206-
For more information about setting `@source`, check out the *"Source Configuration"* page of the Tailwind CSS docs:
207-
[https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources](https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources).
208-
209209
### Configuration of the path to the `npm` executable
210210
211211
*Tailwind CSS* requires *Node.js* to be installed on your machine.

0 commit comments

Comments
 (0)