-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the variants factory plugin's documentation
- Loading branch information
1 parent
2ab1f01
commit 2790db8
Showing
5 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
sidebar: auto | ||
prev: ./font-face.html | ||
next: ./typography.html | ||
next: ./variants-factory.html | ||
--- | ||
|
||
# Grid | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
sidebar: auto | ||
prev: ./grid.html | ||
next: ./typography.html | ||
--- | ||
|
||
# Variants factory | ||
|
||
The variants factory plugin creates simple custom variants on the go and simply is a shorthand for [`addVariant` Tailwind plugin](https://tailwindcss.com/docs/plugins) default functionality. | ||
|
||
## Configuration | ||
|
||
The plugin can be configured with the `theme.customVariants` property: | ||
|
||
```js{3-5} | ||
module.exports = { | ||
theme: { | ||
customVariants: { | ||
children: '& > *', // like addVariant('children', '& > *') | ||
}, | ||
}, | ||
}; | ||
``` | ||
|
||
::: tip | ||
You should add new custom variants to your project via the `theme.extend` property to not override these defaults. | ||
::: |