Created
November 30, 2011 19:12
-
-
Save ahmednuaman/1410363 to your computer and use it in GitHub Desktop.
A little utility to take the pain out of writing vendor prefixed CSS3 animations
This file contains 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
a = [ 'webkit', 'moz', 'ms', 'o', '' ] | |
n = 'enter' | |
f = { | |
'from' : [ | |
'opacity: 0', | |
'.transform( e(\'rotate(360deg)\')' | |
], | |
'to' : [ | |
'opacity: 1', | |
'.transform( e(\'rotate(0deg)\')' | |
] | |
} | |
for p in a: | |
print '@' + ( '-' + p + '-' if p else '' ) + 'keyframes ' + n | |
print '{' | |
for k, v in f.items(): | |
print "\t" + k + ( '%' if k.isdigit() else '' ) + ' { ' + '; '.join( v ) + ' }' | |
print '}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment