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

feat(module): generate tailwindcss theme colors #2967

Merged
merged 10 commits into from
Feb 6, 2025
Merged

feat(module): generate tailwindcss theme colors #2967

merged 10 commits into from
Feb 6, 2025

Conversation

benjamincanac
Copy link
Member

@benjamincanac benjamincanac commented Dec 24, 2024

🔗 Linked issue

Resolves #2948

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This will allow to use Tailwind CSS classes from our design system colors like in Nuxt UI v2, you'll be able to write text-primary-500 dark:primary-400 bg-neutral-50 dark:bg-neutral-800 while allowing the user to override those utilities in their own theme.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

cloudflare-workers-and-pages bot commented Dec 24, 2024

Deploying ui3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: a20d8ec
Status: ✅  Deploy successful!
Preview URL: https://61a394ad.ui-6q2.pages.dev
Branch Preview URL: https://pr-2948.ui-6q2.pages.dev

View logs

@benjamincanac benjamincanac changed the title feat(templates): generate tailwindcss theme colors feat(module): generate tailwindcss theme colors Dec 24, 2024
@benjamincanac benjamincanac added the v3 #1289 label Jan 13, 2025
@hywax
Copy link
Collaborator

hywax commented Jan 14, 2025

Will it take a bunch of variables out of the HTML? I would like to have cleaner HTML

Copy link
Member Author

No it's unrelated, this PR defines those CSS variables as Tailwind CSS colors so you can use text-primary-500 for example but I can't make it work for Vue yet.

You can remove those colors if you don't need them through the theme.colors option in your nuxt.config.ts though: https://ui3.nuxt.dev/getting-started/installation/nuxt#themecolors

@benjamincanac benjamincanac force-pushed the v3 branch 2 times, most recently from aa74a4f to 87234cb Compare February 4, 2025 15:31
Copy link

pkg-pr-new bot commented Feb 6, 2025

npm i https://pkg.pr.new/@nuxt/ui@2967

commit: a20d8ec

benjamincanac and others added 3 commits February 6, 2025 15:50
Co-Authored-By: Sébastien Chopin <[email protected]>
Co-Authored-By: Sébastien Chopin <[email protected]>
@benjamincanac benjamincanac marked this pull request as ready for review February 6, 2025 16:18
@benjamincanac benjamincanac merged commit 443a0be into v3 Feb 6, 2025
3 checks passed
@benjamincanac benjamincanac deleted the pr/2948 branch February 6, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add theme colors as tailwind variables
4 participants