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

Tailwind utility classes not available with nx/next #22918

Closed
1 of 4 tasks
donna-marijne opened this issue Apr 19, 2024 · 2 comments · Fixed by #23313
Closed
1 of 4 tasks

Tailwind utility classes not available with nx/next #22918

donna-marijne opened this issue Apr 19, 2024 · 2 comments · Fixed by #23313
Assignees
Labels
outdated scope: nextjs Issues related to NextJS support for Nx type: bug

Comments

@donna-marijne
Copy link

Current Behavior

Some of the Tailwind utility classes seem to be unavailable when using the Nx integration with Next.js.

https://nx.dev/recipes/react/using-tailwind-css-in-react#using-tailwind-css-in-react-and-nextjs

Expected Behavior

For example, min-h-80 should apply a min-height of 20rem per Tailwind docs.

GitHub Repo

https://github.com/donna-marijne/tailwind-next

Steps to Reproduce

  1. nx dev tailwind-next
  2. Observe the height of the indigo element

We expect min-height: 20rem to be applied due to addition of the min-h-80 class.

Nx Report

Node   : 18.19.1
OS     : win32-x64
npm    : 10.4.0

nx (global)        : 18.0.7
nx                 : 18.3.2
@nx/js             : 18.3.2
@nx/jest           : 18.3.2
@nx/linter         : 18.3.2
@nx/eslint         : 18.3.2
@nx/workspace      : 18.3.2
@nx/devkit         : 18.3.2
@nx/eslint-plugin  : 18.3.2
@nx/next           : 18.3.2
@nx/react          : 18.3.2
@nrwl/tao          : 18.3.2
@nx/web            : 18.3.2
@nx/webpack        : 18.3.2
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/next/plugin
@nx/jest/plugin
@nx/eslint/plugin

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I checked the same utility class in a standalone Next.js+Tailwind app and it works as expected.

@donna-marijne
Copy link
Author

Seems that Nx deploys an older version of tailwindcss than Next does, and the min-h-* utilities were added surprisingly recently in tailwind. So, only a dependency issue after all.

@AgentEnder AgentEnder added the scope: nextjs Issues related to NextJS support for Nx label Apr 29, 2024
ndcunningham added a commit that referenced this issue May 14, 2024
Update next.js to `14.2.4`
Update tailwindcss to `3.4.3`
closes: #22918
Coly010 pushed a commit that referenced this issue May 15, 2024
Update next.js to `14.2.4`
Update tailwindcss to `3.4.3`
closes: #22918
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: nextjs Issues related to NextJS support for Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants