
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
tailwindcss-var-generator
Advanced tools
A plugin for Tailwind CSS that generates CSS variables for all of the colors, sizes, and other styles defined in your Tailwind config. This allows you to use the styles from your Tailwind config directly in your CSS code.
A plugin for Tailwind CSS that generates CSS variables for all of the colors, sizes, and other styles defined in your Tailwind config. This allows you to use the styles from your Tailwind config directly in your CSS code.
To install this package, run the following command:
npm install tailwindcss-var-generator
First, you need to import the tailwindCssVariables function from this package and add it to your Tailwind plugin list:
const plugin = require("tailwindcss/plugin");
const { tailwindCssVariables } = require("tailwindcss-var-generator");
/** @type {import('tailwindcss').Config} */
module.exports = {
theme: {},
plugins: [tailwindCssVariables()],
};
The tailwindCssVariables function takes one optional argument, displayKinds, which is an array of styles that you want to generate CSS variables for. By default, it will generate CSS variables for colors and font sizes. You can pass in any combination of the following values to customize which styles to include:
For example, if you only want to generate CSS variables for colors, you can call the tailwindCssVariables function like this:
tailwindCssVariables(["colors"]);
Once you have added the tailwindCssVariables function to your Tailwind plugin list, you can use the generated CSS variables in your CSS code:
/*
* This will use the value of the `red.500` color defined in your Tailwind
* config as the value of the `color` property.
*/
.my-class {
color: var(--color-red-500);
}
FAQs
A plugin for Tailwind CSS that generates CSS variables for all of the colors, sizes, and other styles defined in your Tailwind config. This allows you to use the styles from your Tailwind config directly in your CSS code.
The npm package tailwindcss-var-generator receives a total of 7 weekly downloads. As such, tailwindcss-var-generator popularity was classified as not popular.
We found that tailwindcss-var-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.