Skip to content

It is considering Tailwind Classes as custom classes #12

Open
@fclaussen

Description

@fclaussen

First of all, thank you very much for this plugin. I'm dropping the prettier plugin in favor of this for my entire team.

Describe the bug

The projects I work on usually define or extend the color palette in the tailwind.config.js. You could have a color called primary that generates bg-primary for example.

Those classes are being treated as custom and being moved to the beginning next to the actual custom ones. In the example below I added a bg-red-100 and a text-secondary as well as a real custom class and you will notice that the text-secondary is now the first one, behind the custom class.

To Reproduce

  1. Customize your color palette in the TailwindCSS config file
  2. Try to use your color class
  3. See error
  4. Double-check your compiled CSS file for order
  5. Confirm error

Expected behavior

I would expect it to know that it is a color class and move it next to the bg-red-100. I also checked my compiled CSS file and the bg-red-100 was on line 516 and text-secondary was on line 527 so in theory, they should go together.

Screenshots

image
Screenshot 2024-01-24 at 5 47 38 PM

Desktop:

  • OS: iOS
  • VSCode version: 1.85.2
  • TW Version: 3.4.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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