Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting not working with postcss in VSCode #186

Open
tqwewe opened this issue May 26, 2022 · 0 comments
Open

Sorting not working with postcss in VSCode #186

tqwewe opened this issue May 26, 2022 · 0 comments

Comments

@tqwewe
Copy link

tqwewe commented May 26, 2022

Describe the bug
Trying to sort classes in a .css/.pcss file does not work with VSCode using "PostCSS" for the file.

To Reproduce
Steps to reproduce the behavior:

  1. Install Headwind from the extension store
  2. Add to package.json:
    "headwind.classRegex": {
      "css": "\\B@apply\\s+([_a-zA-Z0-9\\s\\-\\:\\/]+);",
      "postcss": "\\B@apply\\s+([_a-zA-Z0-9\\s\\-\\:\\/]+);"
    }
  3. Create a file styles.css and add the following:
    .button {
      @apply hover:bg-blue-800 text-white bg-blue-700;
    }
  4. Open the VSCode command pallet and run >Headwind: Sort Tailwind CSS Classes
  5. See nothing happens
  6. Change the active language from PostCSS to CSS
  7. Re-run the command in step 4.
  8. Classes sort successfully

Expected behavior
I expect that PostCSS language should be supported by headwind and classes should be sorted with @apply.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Fedora
  • Browser: Chrome
  • Version: v1.7.0

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant