Skip to content

Almost all tailwind classes are ignored #3891

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

Open
prof-schnitzel opened this issue Apr 14, 2025 · 2 comments
Open

Almost all tailwind classes are ignored #3891

prof-schnitzel opened this issue Apr 14, 2025 · 2 comments
Labels
bug Something isn't working v3 #1289

Comments

@prof-schnitzel
Copy link

prof-schnitzel commented Apr 14, 2025

Environment

  • Operating System: Windows_NT
  • Node Version: v20.10.0
  • Nuxt Version: 3.16.2
  • CLI Version: 3.24.1
  • Nitro Version: 2.11.9
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.2

Reproduction

https://github.com/prof-schnitzel/nuxt-ui3-module

Description

I have this little vue component:

<script setup>
</script>

<template>
  <div class="w-full h-[var(--my-height)] z-10 md:h-[96px]" />
  <div class="hidden md:block">Test</div>
</template>

My expectation would be that all styles belonging to those tailwind classes are applied, but instead I can only see the styles of the classes w-full and hidden. The other classes are ignored. I can't see why. Is this a nuxt ui bug? All of this was still working with the latest alpha version.

Additional context

No response

Logs

@prof-schnitzel prof-schnitzel added bug Something isn't working triage v3 #1289 labels Apr 14, 2025
@selfire1
Copy link

selfire1 commented Apr 15, 2025

We had the same issue when using Nuxt layers in our application. I was able to solve it by explicitly specifying the directories that tailwind should scan:

main.css

@source "../../../layers/Wireframe/**";

It may or may not be related to you issue. But you could try adding the @source directive in index.css, and point it towards your component folder.

Copy link
Member

You can also use the source next to the tailwindcss import, here's an example: https://github.com/nuxt/ui/blob/v3/playground/app/assets/css/main.css#L1

@benjamincanac benjamincanac removed the triage label Apr 15, 2025 — with Volta.net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3 #1289
Projects
None yet
Development

No branches or pull requests

3 participants