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/source/docs/configuration.blade.md
+116-1Lines changed: 116 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,121 @@ Please see the [installation](/docs/installation#4-process-your-css-with-tailwin
28
28
29
29
As you can see below, the default config file is heavily documented. Read through it to get a better understanding of how each section can be customized for your project.
30
30
31
+
<preclass="h-128 overflow-y-scroll language-javascript"><code>{!! str_replace('// var defaultConfig', 'var defaultConfig', file_get_contents(dirname(dirname(__DIR__)).'/defaultConfig.stub.js')) !!}</code></pre>
32
+
33
+
## Options
34
+
35
+
In addition to defining your project's design system, the configuration file can also be used for setting a variety of global options.
36
+
37
+
These options are available under the top-level `options` key, located at the bottom of the configuration file by default.
38
+
39
+
### Prefix
40
+
41
+
The `prefix` option allows you to add a custom prefix to all of Tailwind's generated utility classes.
42
+
43
+
This can be really useful when layering Tailwind on top of existing CSS where there might be naming conflicts.
44
+
45
+
For example, you could add a `tw-` prefix by setting the `prefix` option like so:
46
+
31
47
```js
32
-
{!!str_replace('// var defaultConfig', 'var defaultConfig', file_get_contents(dirname(dirname(__DIR__)).'/defaultConfig.stub.js')) !!}
48
+
{
49
+
// ...
50
+
options: {
51
+
prefix:'tw-',
52
+
// ...
53
+
}
54
+
}
55
+
```
56
+
57
+
It's important to understand that this prefix is added to the beginning of each *utility* name, not to the entire class name.
58
+
59
+
That means that classes with responsive or state prefixes like `sm:` or `hover:` will still have the responsive or state prefix *first*, with your custom prefix appearing after the colon:
0 commit comments