Created
May 19, 2020 02:02
-
-
Save owenconti/f6bf3582a85b63dd644159a5b56318ba to your computer and use it in GitHub Desktop.
Using CSS transforms with TailwindCSS v1.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="transform scale-50 rotate-45 translate-x-full origin-center"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="transform scale-50">Scaled down</div> | |
<div> | |
<div class="inline-block transform rotate-45">Rotated</div> | |
</div> | |
<div class="transform translate-x-1/2">Translated</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="inline-block py-12"> | |
<div class="inline-block p-2 bg-red-500 text-white transform rotate-45 hover:-rotate-45 transition-transform duration-1000 ease-out">Hover me to rotate!</div> | |
</div> | |
<div class="ml-8 inline-block transform hover:translate-x-1/2 transition-transform duration-1000 ease-out">Hover me to slide!</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
center: 'center', | |
top: 'top', | |
'top-right': 'top right', | |
right: 'right', | |
'bottom-right': 'bottom right', | |
bottom: 'bottom', | |
'bottom-left': 'bottom left', | |
left: 'left', | |
'top-left': 'top left', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'0': '0', | |
'50': '.5', | |
'75': '.75', | |
'90': '.9', | |
'95': '.95', | |
'100': '1', | |
'105': '1.05', | |
'110': '1.1', | |
'125': '1.25', | |
'150': '1.5', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'-180': '-180deg', | |
'-90': '-90deg', | |
'-45': '-45deg', | |
'0': '0', | |
'45': '45deg', | |
'90': '90deg', | |
'180': '180deg', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...theme('spacing'), | |
...negative(theme('spacing')), | |
'-full': '-100%', | |
'-1/2': '-50%', | |
'1/2': '50%', | |
full: '100%', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment