Skip to content

Commit e65877a

Browse files
committed
added prefix class name
1 parent 87e74ea commit e65877a

File tree

5 files changed

+939
-895
lines changed

5 files changed

+939
-895
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,12 @@ module.exports = {
164164
require("@designbycode/tailwindcss-text-shadow"
165165
)
166166
({
167-
experimental: true, // 👈
167+
experimental: true, // 👈
168168
})
169169
```
170170
171+
> Note the latest version doesn't need experimental anymore
172+
171173
### Long text shadow
172174
173175
The long shadow is a new experimental feature that I add. It creates shadow that stacks to any amount. The classes is `.text-shadow-sm` or `.text-shadow-[steps]`
@@ -191,6 +193,7 @@ shadow.
191193
// tailwind.config.js
192194
module.exports = {
193195
theme: {
196+
prefix: 'text-shadow',
194197
textShadowSteps: {
195198
sm: "1px",
196199
md: "2px",
@@ -208,6 +211,23 @@ module.exports = {
208211
209212
In this example, we have customized the textShadowSteps object with only four steps for sm, md, lg, and xl, and removed the rest. The plugin will generate utility classes accordingly.
210213
214+
### Change class name prefix
215+
If you don't like to use class name `.text-shadow` or are getting conflicts in application you can change it to whatever you want like `.textShadow`, `ts` or whatever you want. Change it in theme settings.
216+
217+
```typescript
218+
// tailwind.config.js
219+
module.exports = {
220+
theme: {
221+
prefix: 'ts',
222+
},
223+
}
224+
```
225+
226+
### Use
227+
```html
228+
<div class="ts-lg ts-indigo-500"></div>
229+
```
230+
211231
## Contributing
212232
213233
Contributions to this plugin are welcome! If you encounter any issues, have feature requests, or want to improve the plugin, feel free to create a pull request or submit an issue on the GitHub repository.

dist/index.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/index.umd.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)