Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Tailwind v2 plugin to create classes for the accent-color CSS property. Shipped in Chrome 93, Firefox 92 and Safari 15.4.

License

Notifications You must be signed in to change notification settings

lukewarlow/tailwind-accent-color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TailwindCSS Accent Color Plugin

npm

This plugin generates accent-color classes.

Note: As of TailwindCSS v3 these utilities are included by default.

Installation

Add to your project via:

# Install using npm
npm install -D tailwind-accent-color

# Install using yarn
yarn add -D tailwind-accent-color

Add it to the plugins array of your Tailwind config.

plugins: [
  require('tailwind-accent-color')(), // no options to configure
]

An accent-{color} class will be created for each Tailwind color, much like bg- classes.

Optionally, you can also customise the variants for the plugin, by adding to the variants section of your Tailwind config.

variants: {
	accentColor: ['responsive', 'dark', 'group-hover', 'focus-within', 'hover', 'focus'] // Listed are the defaults
}

License

This project is licensed under the MIT License.