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

Adding NuxtUI affects regular HTML <input/> #270

Closed
kstraszewski opened this issue Jun 9, 2023 · 3 comments · Fixed by #278
Closed

Adding NuxtUI affects regular HTML <input/> #270

kstraszewski opened this issue Jun 9, 2023 · 3 comments · Fixed by #278
Labels
bug Something isn't working

Comments

@kstraszewski
Copy link

kstraszewski commented Jun 9, 2023

Version

@nuxthq/ui: v2.3.0
nuxt: v3.5.0

Reproduction Link

https://stackblitz.com/edit/nuxtlabs-ui-3bkhpx?file=app.vue

Steps to reproduce

Just check css of regular html <Input/>

What is Expected?

Regular HTML <input/> should have zero CSS applied.

What is actually happening?

Adding NuxtUI to project adding some tailwindCSS to base input. It should only apply those CSS to UInput. It makes it impossible to start transition from other frameworks to NuxtUI. Im using Vuetify for now, and it would be great to use vuetify along NuxtUI and some of the Pages in Nuxt just using without Vuetify, but i can't coz when I add NuxtUI to project it automatically corrupting all of the inputs inside project :/ It forces developer to remove primary library, and then add NuxtUI which makes transition impossible.

@kstraszewski kstraszewski added the bug Something isn't working label Jun 9, 2023
@jaybharadia
Copy link
Contributor

Hi @kstraszewski
I have checked the issue.
According to my understanding,

  • The input background color : white is disturbing (text is not visible ) and important bug to notice 🤔 .
  • Other UI styles are applied that is okay.

Please confirm. I am also attaching the screenshot here
image

@kstraszewski
Copy link
Author

kstraszewski commented Jun 10, 2023

I mean in my opinion tailwind shouldn't apply any CSS to base <input/> only for <UInput/>. If any of the base HTML elements will have applied CSS it will make any hybrid transition impossible. I have Vuetify in my project, but i would like to start moving to something lighter than vuetify, NuxtUI seems great, but it would be great if I could use both for some time and slowly removing Vuetify. It is not possible for now, coz NuxtUI is applying styles to every <input/> it can find and corrupting Vuetify input <v-text-field/> (which convert into <input/> in DOM)

Regular HTML <input/> should look like this to make any transition possible:

image

Copy link
Member

I'm afraid this is because of tailwindlabs/tailwindcss-forms plugin which resets form styles. I'll try to submit a fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants