Skip to content

Tailwind CSS plugin to easily manage colors via CSS variables

License

Notifications You must be signed in to change notification settings

doeanderson/tailwindcss-color-vars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tailwind CSS Color Vars Plugin

Tailwind CSS plugin to easily manage colors via CSS variables. Pass an object of colors defined in RGB format and the theme's colors, fill and stroke will automatically have them, as well as a CSS variable for each color added to the document root.

Usage

yarn add --dev @doeanderson/tailwindcss-color-vars

Add the following plugin to your tailwind.config.js file:

require('@doeanderson/tailwindcss-color-vars')({
  colorName: 'R G B',
})

If you want variants of one color, you can format it like this:

{
  colorName: {
    light: 'R G B',
    DEFAULT: 'R G B',
  },
}

Additionally, you can still extend or override colors via the standard theme configuration property.

License

MIT License

About

Tailwind CSS plugin to easily manage colors via CSS variables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published