✉️ Feature request: Add native mixins & functions support like Sass #18632
AyoubElarfaoui666
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
✉️ Feature request: Add native mixins & functions support like Sass
Hi Tailwind CSS team 👋
First of all, thank you for the amazing work you’ve done! Tailwind has completely changed the way we write CSS and made building UIs fast, consistent, and fun.
I’d love to suggest a feature that would make Tailwind even more powerful for complex projects:
🧩 Feature idea
Add support for:
🎯 Why this would help
✅ Current workarounds
✨ How it might look (hypothetical)
@tailwind-mixin btn($bg, $color) {
@apply px-4 py-2 rounded font-semibold;
background-color: $bg;
color: $color;
&:hover {
background-color: transparent;
color: $bg;
}
}
and use it like:
.btn-primary {
@include btn(#1e40af, white);
}
I know this would be a big change and that Tailwind is intentionally utility-first, but I think it could bring the best of both worlds: fast utility building and DRY reusable logic for larger codebases.
Thank you so much for considering this!
Happy to discuss further or contribute to an RFC.
Best regards 🙏
Beta Was this translation helpful? Give feedback.
All reactions