Skip to content

PostCSS plugin that replaces Tailwind RGB(a) values with hexadecimal analogues

License

Notifications You must be signed in to change notification settings

RobertCordes/postcss-tailwind-hex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postcss-tailwind-hex

PostCSS plugin that replaces Tailwind RGB(a) values with hexadecimal analogues

Processing example

this code

.element {
    border: 2px solid rgba(0, 0, 0, var(--tw-text-opacity));
}

converts to

.element {
    border: 2px solid #000000;
}

Installation

npm i --save-dev @diverently/postcss-tailwind-hex

Usage

postcss([ require('postcss-tailwind-hex') ])

Please refer to PostCSS documentation for you current environment.

Options

rgbOnly [Boolean]

default: false

Process only rgb color values

rgbaOnly [Boolean]

default: false

Process only rgba color values

silent [Boolean]

default: false

Omit verbose conversion logging

About

PostCSS plugin that replaces Tailwind RGB(a) values with hexadecimal analogues

Topics

Resources

License

Stars

Watchers

Forks