Skip to content

Commit 9b61c97

Browse files
authored
📝 Improve the wordpressThemeJson documentation (#8)
1 parent 35a54ec commit 9b61c97

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,23 @@ export default defineConfig({
108108
],
109109
});
110110
```
111+
112+
By default, Tailwind v4 will only [generate CSS variables](https://tailwindcss.com/docs/theme#generating-all-css-variables) that are discovered in your source files.
113+
114+
To generate the full default Tailwind color palette into your `theme.json`, you can use the `static` theme option when importing Tailwind:
115+
116+
```css
117+
@import 'tailwindcss' theme(static);
118+
```
119+
120+
The same applies for customized colors in the `@theme` directive. To ensure your colors get generated, you can use another form of the `static` theme option:
121+
122+
```css
123+
@theme static {
124+
--color-white: #fff;
125+
--color-purple: #3f3cbb;
126+
--color-midnight: #121063;
127+
--color-tahiti: #3ab7bf;
128+
--color-bermuda: #78dcca;
129+
}
130+
```

0 commit comments

Comments
 (0)