tailwindcss-color-css-vars
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

tailwindcss-color-css-vars

This Tailwind CSS plugin allows you to set CSS variables with arbitrary names with values from the theme palette.

Deprecation Notice

You probably should not use this plugin anymore. Similar functionality is built into Tailwind CSS now using arbitrary properties and theme functions.

<div className="[--brand-text:theme(colors.red.500)]">
  <span className="text-[color:var(--brand-text)]">Brand</span>
</div>

Example

<div className="color-var-[brand-text_red-500]">
  <span className="text-[color:var(--brand-text)]">Brand</span>
</div>

Installation

Add this plugin to your tailwind.config.js

const { colorVars } = require('tailwindcss-color-css-vars');

module.exports = {
  content: [
    ...
  ],
  plugins: [colorVars],
};

This library was generated with Nx.

Building

Run nx build tailwindcss-color-css-vars to build the library.

Running unit tests

Run nx test tailwindcss-color-css-vars to execute the unit tests via Jest.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.27latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.27
0.0.11
0.0.1-alpha.10
0.0.1-alpha.01

Package Sidebar

Install

npm i tailwindcss-color-css-vars

Weekly Downloads

0

Version

0.0.2

License

none

Unpacked Size

4.75 kB

Total Files

9

Last publish

Collaborators

  • joeflateau