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

[Feature request] Discourage developers from creating custom classes with same name as existing Tailwind classes #320

Open
ssalib-aamc opened this issue Feb 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ssalib-aamc
Copy link

Is your feature request related to a problem? Please describe.
It's easy to create a css class that has the same name of existing Tailwind class because most developers don't have all Tailwind classes memorized.

Describe the solution you'd like
We would like to show a warning (possibly an error) when developers attempt to add a new template css class with the same name of a Tailwind utility class. Example: "container" or "p-0" in our .scss files should trigger a linting warning/error.

Describe alternatives you've considered
We do not want to use a Tailwind pre-fix to respect the advantages of atomic css classes terse short-hand nature.

Additional context
We can start with the obvious one to one match such as "container" and then move to more complex cases such as "p-" or "m-" followed by a number.
It would be great if we have control to set this rule as a warning OR error based on our code state and preference.

@ssalib-aamc ssalib-aamc added the enhancement New feature or request label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant