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
Using primary
/ gray
as main colors might conflict with existing projects.
#1721
Comments
I found the configuration Turns out, you can not use
And then you are free to use |
The goal of this feature is to be able to change your colors dynamically through your If you name a color primary or gray the module will erase it as we need the CSS variables. I hear it might be a conflict in some projects but we're too committed to this naming to change it in my opinion. Even in the next major (v3), I don't plan to change this. |
Thanks for the explanation! What would actually be detrimental from your side, if you used From a workload-perspective, the change should be done pretty quickly using search and replace. Imho this is a problem as old as CSS. It has been a long-time best practice for packages to have a specific prefix with their classes to not get into conflict with existing classes from the main project or other packages. Only now Tailwind is in the middle - but the problem is still the same. What if other packages decide to also define their own |
Description
primary
,secondary
, etc. is a rather popular naming scheme for tailwind-color-classes in many projects. This leads to problems when trying to addnuxt/ui
to such a project, since it defines and usesprimary
itself. The same problem could arise withgray
.I would suggest renaming the classes to e.g.
ui-primary
, or make the class-name configurable.Additional context
No response
The text was updated successfully, but these errors were encountered: