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

UFormGroup error state doesn't load css classes #373

Closed
kstraszewski opened this issue Jul 1, 2023 · 3 comments
Closed

UFormGroup error state doesn't load css classes #373

kstraszewski opened this issue Jul 1, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@kstraszewski
Copy link

Version

@nuxthq/ui: 2.50
nuxt: v3.6.1

Reproduction Link

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

Steps to reproduce

Look at UInput

What is Expected?

UInput should load ring-red-500 dark:ring-red-400 focus:ring-2 focus:ring-red-500 dark:focus:ring-red-400 classes but they does not exist. Framework properly adding those classes, but those classes does not load.

image

What is actually happening?

@kstraszewski kstraszewski added the bug Something isn't working label Jul 1, 2023
@kstraszewski
Copy link
Author

The problem is that tailwind doesn't load this classes, when I add some span anywere in the project, everything works fine:

      <span
        class="ring-red-500 dark:ring-red-400 focus:ring-2 focus:ring-red-500 dark:focus:ring-red-400"
      ></span>

Copy link
Member

The issue here is that the red color for the Input hasn't been safelisted as there is no such code as <UInput color="red" />. We should safelist it by default I guess.

Copy link
Member

For now, you can safelist the red color manually in your nuxt.config.ts:

ui: {
    safelistColors: ['red']
}

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

No branches or pull requests

2 participants