2.0.0 • Published 2 years ago

@robertcordes/postcss-tailwind-hex v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

License