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

custom tailwind style in @layer directive cannot be used within <style> block #2099

Open
laporchen opened this issue Sep 2, 2024 · 0 comments
Labels
bug Something isn't working triage

Comments

@laporchen
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v20.6.1
  • Nuxt Version: 3.13.0
  • CLI Version: 3.13.1
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: compatibilityDate, devtools, modules
  • Runtime Modules: @nuxt/[email protected]
  • Build Modules: -

Version

2.18.4

Reproduction

https://stackblitz.com/edit/nuxt-ui-rzyn6r?file=assets%2Fcss%2Ftailwind.css

Description

I tried to use @apply in <style> block in my vue files. But I got the error that my class does not exists.

[vite-node] [plugin:vite:css] [CssSyntaxError] ./app.vue:9:2 : The `bar` class does not exist. If `bar` is a custom class, make sure it is defined within a `@layer` directive.

I also tested it without @nuxt/ui module but only @nuxtjs/tailwindcss module, which works perfectly fine.
I looked for config in nuxt UI document, but didn't find anything that could help fixing this.

Additional context

Here's one reproduction with only @nuxtjs/tailwindcss installed
https://stackblitz.com/edit/nuxt-ui-eadnqo?file=nuxt.config.ts

Logs

No response

@laporchen laporchen added bug Something isn't working triage labels Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant