@robertcordes/postcss-tailwind-hex

2.0.0 • Public • Published

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

Package Sidebar

Install

npm i @robertcordes/postcss-tailwind-hex

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

4.66 kB

Total Files

4

Last publish

Collaborators

  • robertcordes