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(components): Add Tailwind v4 theme code generation #6668

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Jehoshaphat-Obol
Copy link

This feature introduces a options on the theme page, allowing users to select their target Tailwind CSS version (<v4 or v4+). This ensures that the generated CSS is compatible with the user's project.

Previously, the theme generator only produced CSS compatible with older Tailwind versions, which caused issues for users on v4. This change addresses those compatibility problems.

The implementation involves modifying the CSS generation logic to handle the differences between Tailwind versions. Specifically, v4 requires the use of @theme inline and hsl() wrappers for color values. The selected version is used to determine the correct CSS syntax.

This change improves the user experience by providing a more flexible and robust theme generation process.

This feature introduces a options on the theme generation page, allowing users to select their target Tailwind CSS version (<v4 or v4+).  This ensures that the generated CSS is compatible with the user's project.

Previously, the theme generator only produced CSS compatible with older Tailwind versions, which caused issues for users on v4.  This change addresses those compatibility problems.

The implementation involves modifying the CSS generation logic to handle the differences between Tailwind versions.  Specifically, v4 requires the use of `@theme inline` and `hsl()` wrappers for color values.  The selected version is used to determine the correct CSS syntax.

This change improves the user experience by providing a more flexible and robust theme generation process.
Copy link

vercel bot commented Feb 17, 2025

@Jehoshaphat-Obol is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@Jehoshaphat-Obol Jehoshaphat-Obol changed the title feat(components): Add Tailwind v4 theme code generation (#6585) feat(components): Add Tailwind v4 theme code generation Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant