Skip to content

[BUG] Arbitrary values of color opacity are not Tailwind classes #80

@Serator

Description

@Serator

Describe the bug

When you insert the stroke-sky-500/[.1] class, you get an invalid warning:

Classname 'stroke-sky-500/[.1]' is not a Tailwind CSS class! | eslinttailwindcss/no-custom-classname

This applies to all arbitrary values of color opacity (stroke-sky-500/[.1], text-sky-500/[.1], hover:before:border-sky-500/[.1]...).

To Reproduce
Steps to reproduce the behavior:

  1. Type stroke-sky-500/[.1] in your code.
  2. Run lint
  3. You will get the message.

Expected behavior
No warning would happen.

Environment (please complete the following information):

  • OS: Windows 10
  • Softwares + version used:
    • VSCode: 1.63.2
    • eslint-plugin-tailwindcss: 3.0.0
    • tailwindcss: 3.0.7
      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