I would like to apply several tranform functions to Tailwind CSS for one element order from left to right like this :
transform: rotate(45deg) translateX(50%);
But if I apply class like this, rotation is applied last.
class="transform rotate-45 translate-x-1/2"
A link to illustrate my problem :
Play.tailwindcss.com/R6PBP2OHPy
I solved this by rotating the parent div element and translating the child element. Not the most elegant solution but it works.
<div class="rotate-45">
<img class="translate-x-12"/>
</div>
https://play.tailwindcss.com/dvZnRRaKq1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With