You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/settings.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,6 @@ your project.
65
65
> TAILWIND_CLI_ASSET_NAME = "tailwindcss-extra"
66
66
> ```
67
67
68
-
69
68
`TAILWIND_CLI_SRC_CSS`
70
69
**Default**: `None`
71
70
@@ -82,3 +81,21 @@ your project.
82
81
83
82
The name of the output file. This file is stored relative to the first element of the
84
83
`STATICFILES_DIRS` array.
84
+
85
+
`TAILWIND_CLI_USE_DAISY_UI`:
86
+
: **Default**: `False`
87
+
88
+
This switch determines what content is written to `TAILWIND_CLI_SRC_CSS` if it is automatically created by the library.
89
+
90
+
The default is:
91
+
```css
92
+
@import "tailwindcss";
93
+
```
94
+
95
+
If `TAILWIND_CLI_USE_DAISY_UI = True` is put into the `settings.py` of your project, this is the output:
96
+
```css
97
+
@import "tailwindcss";
98
+
@plugin "daisyui";
99
+
```
100
+
101
+
This switch can also be used as a shortcut to activate daisyUI and change `TAILWIND_CLI_SRC_REPO` and `TAILWIND_CLI_ASSET_NAME` as described above to fetch [tailwind-cli-extra](https://github.com/dobicinaitis/tailwind-cli-extra/releases/latest/).
Copy file name to clipboardExpand all lines: docs/usage.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,11 +105,32 @@ tailwind-sidecar:
105
105
106
106
## Use with daisyUI
107
107
108
-
If you plan to use the [daisyUI](https://daisyui.com) components in your project, I highly recommend the custom CLI build [tailwind-cli-extra](https://github.com/dobicinaitis/tailwind-cli-extra) by [Andris Dobičinaitis](https://github.com/dobicinaitis).
108
+
If you plan to use [daisyUI](https://daisyui.com), there is an easy way to solve this with this library.
109
109
110
-
Just add the following settings to your `settings.py`file.
110
+
```python
111
+
TAILWIND_CLI_USE_DAISY_UI = True
112
+
```
113
+
114
+
Setting this, the library switches from using the default TailwindCSS CLI to the one provided by [Andris Dobičinaitis](https://github.com/dobicinaitis) and his [tailwind-cli-extra](https://github.com/dobicinaitis/tailwind-cli-extra) project. It also causes the library to create a proper default config that activates the daisyUI plugin.
115
+
116
+
But of course you can do it manually, too. Just configure a repository where the library should pull the CLI from and activate the daisyUI support.
If you are using [WhiteNoise](https://whitenoise.readthedocs.io/en/latest/) to serve your static assets, you must not put your custom Tailwind configuration file inside any of the directories for static files. WhiteNoise stumbles across the `@import "tailwindcss";` statement, because it can't resolve it.
135
+
136
+
If you want to use a custom configuration forTailwind CSS, put it somewhere elsein the project.
0 commit comments