Skip to content

Prefer @custom-variant over @variant #1961

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

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

wongjn
Copy link
Contributor

@wongjn wongjn commented Jan 23, 2025

(Sorry if I misinterpreted the intentions of @custom-variant and @variant)

  • Replaces code usages of @variant to @custom-variant as per Implement @variant tailwindcss#15663.
  • Disambiguates some usage of @variant in examples to show that it should be used inside a rule, and not at the root.

It could look like they are at the root of the CSS file. Show that they
are still nested inside a rule.
Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 6:47pm

@thecrypticace
Copy link
Contributor

💯

Thanks!

@thecrypticace thecrypticace merged commit d6b800e into tailwindlabs:main Jan 23, 2025
2 checks passed
@wongjn wongjn deleted the custom-variant branch January 23, 2025 18:50
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.

2 participants