Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chasegiunta/tailwindcss-important
!important variant plugin for tailwindcss framework
https://github.com/chasegiunta/tailwindcss-important
Last synced: 14 days ago
JSON representation
!important variant plugin for tailwindcss framework
- Host: GitHub
- URL: https://github.com/chasegiunta/tailwindcss-important
- Owner: chasegiunta
- Archived: true
- Created: 2018-08-28T22:29:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-04T17:21:42.000Z (about 3 years ago)
- Last Synced: 2024-09-21T06:56:38.127Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 41
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# !important Tailwind Plugin
## Installation
Add this plugin to your project:
```bash
# Install via npm
npm install --save-dev tailwindcss-important# Install via yarn
yarn add tailwindcss-important --dev
```Adding variants through plugins is currently an experimental feature in tailwind and requires version 0.6.2 or higher.
## Usage
The important plugin exposes an `important` variant for you to use by prepending `!` to your class names: `!text-white !bg-black`
```js
require('tailwindcss-important')()
``````js
textColors: ['responsive', 'hover', 'important'],
```### Purgecss
If you're using purgecss, you'll want to update your TailwindExtractor to include `!`.
```
content.match(/[A-Za-z0-9-_:!\/]+/g) || [];
```