Skip to content

[BUG] Adding nested color in tailwind.config triggers tailwindcss/no-custom-classname warning #145

@boompikachu

Description

@boompikachu

Describe the bug
Adding nested color in tailwind.config triggers tailwindcss/no-custom-classname warning

To Reproduce
Steps to reproduce the behavior:

  1. Add the following to tailwind.config file
colors: {
    transparent: 'transparent',
    current: 'currentColor',
    white: '#FFFFFF',
    black: '#000000',
    example: {
      1: '#F0f025',
    },
    category: {
      example: {
        1: '#F0F025',
      },
    },
}
  1. Add text-category-example-1 to className

Expected behavior
Should not trigger eslint warning

Screenshots
This doesn't work
image
This works
image

Environment (please complete the following information):

  • OS: macOS
  • Softwares + version used:
    • VSCode 1.67

Additional context
Add any other context about the problem here.

eslint config file or live demo
By providing a link to a live demo, a demo video or a github repo fixing the issue will be easier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions