Skip to content

Automatic TailwindCSS Detection & Opt-out #307

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

Closed
noor-codes opened this issue Mar 9, 2021 · 3 comments
Closed

Automatic TailwindCSS Detection & Opt-out #307

noor-codes opened this issue Mar 9, 2021 · 3 comments

Comments

@noor-codes
Copy link

Automatic TailwindCSS Detection & Opt-out

TailwindCSS Generates thousands of classes, sometimes it goes over 200k. It should automatically opt-out of indexing them for performance reasons.

@tailwindcss already has a built-in extension for it.

I love this extension but I just don't prefer it when I am working with Tailwind.

This update will help a lot cause I manually disable it for each and every workspace.

Thanks!

@zignd
Copy link
Owner

zignd commented Mar 9, 2021

Have you considered the html-css-class-completion.excludeGlobPattern user setting to skip Tailwind files?

It is described here in the README.md: https://github.com/zignd/HTML-CSS-Class-Completion#folders-and-files

@noor-codes
Copy link
Author

noor-codes commented Mar 10, 2021

I have no idea where the tailwind files are. I use NextJs and all the files live in .next folder.

Considering advanced built-in features like code splitting and dynamically injecting things when the components mount in run-time, It would be pretty hard to use html-css-class-completion.excludeGlobPattern solution.

Common Issues

  • I can setup the GlobalExclude Pattern in this case but that varies from project to project
  • Some projects inject CSS dynamically into the DOM using JavaScript so we can't trace that.
  • It eventually becomes a setup hell.

@noor-codes
Copy link
Author

I suggest, at least if there is a way for the extension to look for tailwind.config.js file at the top level root file tree and if there is one, just skip indexing stuff in the project would be really helpful.

@noor-codes noor-codes closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants