Skip to content

Commit

Permalink
πŸ“– documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Graffis committed Mar 27, 2021
1 parent 4ff57f2 commit 46b1c29
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ In your tailwind.config.js:

```js
plugins: [
require('tailwind-dracula'),
require('tailwind-dracula')(),
],
```

Expand All @@ -40,7 +40,37 @@ Color naming has two options (based on Dracula's names with some changes where n
* The color name option. <i>ie. darker, pink, purple</i>
* The vampire name option. <i>ie. dracula, vonCount, buffy</i>

> :hand: **The default color names for Dracula can override the tailwind default style names. See below on how to prefix your Dracula color names.
> :hand: The default color names for Dracula can override the tailwind default style names.
## Prefixing color names
By default the plugin accepts a prefix that can be used for the color name options (to avoid clashes with tailwind defaults).
```js
plugins: [
require('tailwind-dracula')('dracula'),
],
```
Then use the color name option with the dracula prefix, but use the vampire name options without the prefix
```html
<div class="bg-dracula-pink">
<p class="text-nosferatu ">I vant to suck your blood...</p>
<p class="text-pink-500 ">Tailwind is cool...</p> //still works!
</div>
```

You can also add the prefix for <b><i>ALL</i></b> names by passing `true` into the second parameter.
```js
plugins: [
require('tailwind-dracula')('dracula', true),
],
```
Now all colors within dracula will require the dracula prefix
```html
<div class="bg-dracula-pink"> //works!
<p class="text-nosferatu ">I vant to suck your blood...</p> //doesn't work!
<p class="text-dracula-buffy ">Flesh of my flesh...</p> //works!
<p class="text-pink-500 ">Tailwind is cool...</p> //still works!
</div>
```

## Color Palette

Expand Down

0 comments on commit 46b1c29

Please sign in to comment.