tailwindcss-variable-colors icon indicating copy to clipboard operation
tailwindcss-variable-colors copied to clipboard

Is it compatible with tailwindcss v4.1?

Open resetsix opened this issue 7 months ago • 0 comments

I am using this project in v4.1, and only child elements with dark:xx will switch to dark mode. In other words, tailwindcss-variable-colors is not taking effect. However, it could also be due to my usage issue. Here is my tailwind.config.ts configuration.

import type { Config } from 'tailwindcss'
import { createVariableColors, variableColorsPlugin } from 'tailwindcss-variable-colors'
import colors from 'tailwindcss/colors'

const config: Config = {
  content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
  theme: {
    extend: {
      colors: createVariableColors(colors),
    },
  },
  plugins: [variableColorsPlugin(colors)],
}

export default config

resetsix avatar May 08 '25 03:05 resetsix