Replies: 1 comment 1 reply
-
I think in Tailwind, you'd abstract the CSS to a template component. This is because the Tailwind paradigm is that you write Tailwind classes in your templates only, and avoid writing any CSS at all. So an equivalent in Tailwind CSS could be: <div class="{{ bar ? 'text-yellow-500' : 'text-red-500' }}">
{{ content }}
</div> Otherwise, you can already do this with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is an example of how to implement a mixin in the lightningcss documentation.
https://lightningcss.dev/transforms.html#custom-at-rules
Is there any plan to implement such a feature? It would be really useful.
Beta Was this translation helpful? Give feedback.
All reactions