-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind_info.txt
50 lines (32 loc) · 986 Bytes
/
tailwind_info.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
How to integrated Tailwind css with django:
Run these two command in the terminal
1. npm install -D tailwindcss
2. npx tailwindcss init
3. Add the paths to all of your template files in your tailwind.config.js file:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./**/*.{html,js}"],
theme: {
extend: {
spacing: {
'some key': {
1.5: '<something>',
},
},
},
},
plugins: [],
}
4. Add these @tailwind resources to your 'static/tw/input.css' directory file:
@tailwind base;
@tailwind components;
@tailwind utilities;
5. add this @tailwind code to your package.json file:
"scripts": {
"build": "tailwindcss -i ./static/tw/input.css -o ./static/tw/output.css --watch"
}
6. Run this command in the terminal:
python manage.py collectstatic
7. Run this command in the terminal too:
npm run build
If everything you have done correctly, then tailwind will be worked successfully!!