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

undefined tailwind variables, css sourcemap warnings #2964

Closed
endquote opened this issue Dec 23, 2024 · 4 comments
Closed

undefined tailwind variables, css sourcemap warnings #2964

endquote opened this issue Dec 23, 2024 · 4 comments
Labels
bug Something isn't working v3 #1289

Comments

@endquote
Copy link

Environment

------------------------------
- Operating System: Darwin
- Node Version:     v23.2.0
- Nuxt Version:     3.14.1592
- CLI Version:      3.17.1
- Nitro Version:    2.10.4
- Package Manager:  [email protected]
- Builder:          -
- User Config:      default
- Runtime Modules:  @nuxt/[email protected]
- Build Modules:    -
------------------------------

Is this bug related to Nuxt or Vue?

Nuxt

Version

@nuxt/[email protected]

Reproduction

https://github.com/endquote/github-ugsebknu

Description

Tailwind in general is working fine for layout classes. However if I use a class like drop-shadow-lg it does not have an impact as it seems some variables are undefined.

Image

Perhaps related, I'm seeing these warnings when building:

[vite:css] Lexical error on line 1: Unrecognized text.                                                                                                                                                                                                                                     4:12:25 PM

  Erroneous area:
1: infinity * 1px
^..^
945|    }
946|    .rounded-full {
947|      border-radius: calc(infinity * 1px);
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
948|    }
949|    .rounded-s { (x2)

ℹ ✓ 227 modules transformed.                                                                                                                                                                                                                                                                     4:12:26 PM
[plugin @tailwindcss/vite:generate:build] Sourcemap is likely to be incorrect: a plugin (@tailwindcss/vite:generate:build) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help

In nuxt.config.ts I have this:
css: ["~/assets/css/main.css"]

In main.css I have this:

@import "tailwindcss";
@import "@nuxt/ui";

Additional context

I'm new to vue/nuxt/tailwind so it's entirely possible I'm doing something wrong.

Logs

@benjamincanac
Copy link
Member

benjamincanac commented Dec 25, 2024

The warning is due to Vite, this has been reported to the Tailwind CSS team already.

However, the generated drop-shadow-lg class seems fine to me. This how Tailwind CSS handles it, check out: https://play.tailwindcss.com/ULRM1tgeWf. If you add the sepia class for example, you'll see the --tw-sepia css variable filled.

@endquote
Copy link
Author

Thanks for the reply, I think I understand better. The default shadow was so light that I just couldn't even discern it by default.

@HugoRCD HugoRCD marked this as a duplicate of #3063 Jan 10, 2025
@HugoRCD HugoRCD marked this as not a duplicate of #3063 Jan 10, 2025
@benjamincanac benjamincanac removed the triage label Jan 25, 2025 — with Volta.net
@vighnesh153
Copy link

The warning is due to Vite, this has been reported to the Tailwind CSS team already.

Could you please provide a link to the ticket here? It would be very helpful for tracking purposes. Thank you.

Copy link
Member

benjamincanac commented Feb 15, 2025

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