Skip to content

Is it compatible with tailwindcss v4.1? #6

@resetsix

Description

@resetsix

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions