Skip to content

Commit e29e960

Browse files
authored
Merge pull request #2068 from tailwindlabs/animation-utilities
Add animation support
2 parents 05fe015 + bb1519a commit e29e960

File tree

7 files changed

+636
-0
lines changed

7 files changed

+636
-0
lines changed

__tests__/fixtures/tailwind-output-ie11.css

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,50 @@ video {
577577
height: auto;
578578
}
579579

580+
@keyframes spin {
581+
from {
582+
transform: rotate(0deg);
583+
}
584+
585+
to {
586+
transform: rotate(360deg);
587+
}
588+
}
589+
590+
@keyframes ping {
591+
0% {
592+
transform: scale(1);
593+
opacity: 1;
594+
}
595+
596+
75%, 100% {
597+
transform: scale(2);
598+
opacity: 0;
599+
}
600+
}
601+
602+
@keyframes pulse {
603+
0%, 100% {
604+
opacity: 1;
605+
}
606+
607+
50% {
608+
opacity: .5;
609+
}
610+
}
611+
612+
@keyframes bounce {
613+
0%, 100% {
614+
transform: translateY(-25%);
615+
animation-timing-function: cubic-bezier(0.8,0,1,1);
616+
}
617+
618+
50% {
619+
transform: translateY(0);
620+
animation-timing-function: cubic-bezier(0,0,0.2,1);
621+
}
622+
}
623+
580624
.container {
581625
width: 100%;
582626
}
@@ -10950,6 +10994,26 @@ video {
1095010994
transition-delay: 1000ms;
1095110995
}
1095210996

10997+
.animate-none {
10998+
animation: none;
10999+
}
11000+
11001+
.animate-spin {
11002+
animation: spin 1s linear infinite;
11003+
}
11004+
11005+
.animate-ping {
11006+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
11007+
}
11008+
11009+
.animate-pulse {
11010+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
11011+
}
11012+
11013+
.animate-bounce {
11014+
animation: bounce 1s infinite;
11015+
}
11016+
1095311017
.example {
1095411018
font-weight: 700;
1095511019
color: #f56565;
@@ -21329,6 +21393,26 @@ video {
2132921393
transition-delay: 1000ms;
2133021394
}
2133121395

21396+
.sm\:animate-none {
21397+
animation: none;
21398+
}
21399+
21400+
.sm\:animate-spin {
21401+
animation: spin 1s linear infinite;
21402+
}
21403+
21404+
.sm\:animate-ping {
21405+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
21406+
}
21407+
21408+
.sm\:animate-pulse {
21409+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
21410+
}
21411+
21412+
.sm\:animate-bounce {
21413+
animation: bounce 1s infinite;
21414+
}
21415+
2133221416
.sm\:example {
2133321417
font-weight: 700;
2133421418
color: #f56565;
@@ -31709,6 +31793,26 @@ video {
3170931793
transition-delay: 1000ms;
3171031794
}
3171131795

31796+
.md\:animate-none {
31797+
animation: none;
31798+
}
31799+
31800+
.md\:animate-spin {
31801+
animation: spin 1s linear infinite;
31802+
}
31803+
31804+
.md\:animate-ping {
31805+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
31806+
}
31807+
31808+
.md\:animate-pulse {
31809+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
31810+
}
31811+
31812+
.md\:animate-bounce {
31813+
animation: bounce 1s infinite;
31814+
}
31815+
3171231816
.md\:example {
3171331817
font-weight: 700;
3171431818
color: #f56565;
@@ -42089,6 +42193,26 @@ video {
4208942193
transition-delay: 1000ms;
4209042194
}
4209142195

42196+
.lg\:animate-none {
42197+
animation: none;
42198+
}
42199+
42200+
.lg\:animate-spin {
42201+
animation: spin 1s linear infinite;
42202+
}
42203+
42204+
.lg\:animate-ping {
42205+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
42206+
}
42207+
42208+
.lg\:animate-pulse {
42209+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
42210+
}
42211+
42212+
.lg\:animate-bounce {
42213+
animation: bounce 1s infinite;
42214+
}
42215+
4209242216
.lg\:example {
4209342217
font-weight: 700;
4209442218
color: #f56565;
@@ -52469,6 +52593,26 @@ video {
5246952593
transition-delay: 1000ms;
5247052594
}
5247152595

52596+
.xl\:animate-none {
52597+
animation: none;
52598+
}
52599+
52600+
.xl\:animate-spin {
52601+
animation: spin 1s linear infinite;
52602+
}
52603+
52604+
.xl\:animate-ping {
52605+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
52606+
}
52607+
52608+
.xl\:animate-pulse {
52609+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
52610+
}
52611+
52612+
.xl\:animate-bounce {
52613+
animation: bounce 1s infinite;
52614+
}
52615+
5247252616
.xl\:example {
5247352617
font-weight: 700;
5247452618
color: #f56565;

__tests__/fixtures/tailwind-output-important.css

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,50 @@ video {
577577
height: auto;
578578
}
579579

580+
@keyframes spin {
581+
from {
582+
transform: rotate(0deg);
583+
}
584+
585+
to {
586+
transform: rotate(360deg);
587+
}
588+
}
589+
590+
@keyframes ping {
591+
0% {
592+
transform: scale(1);
593+
opacity: 1;
594+
}
595+
596+
75%, 100% {
597+
transform: scale(2);
598+
opacity: 0;
599+
}
600+
}
601+
602+
@keyframes pulse {
603+
0%, 100% {
604+
opacity: 1;
605+
}
606+
607+
50% {
608+
opacity: .5;
609+
}
610+
}
611+
612+
@keyframes bounce {
613+
0%, 100% {
614+
transform: translateY(-25%);
615+
animation-timing-function: cubic-bezier(0.8,0,1,1);
616+
}
617+
618+
50% {
619+
transform: translateY(0);
620+
animation-timing-function: cubic-bezier(0,0,0.2,1);
621+
}
622+
}
623+
580624
.container {
581625
width: 100%;
582626
}
@@ -14336,6 +14380,26 @@ video {
1433614380
transition-delay: 1000ms !important;
1433714381
}
1433814382

14383+
.animate-none {
14384+
animation: none !important;
14385+
}
14386+
14387+
.animate-spin {
14388+
animation: spin 1s linear infinite !important;
14389+
}
14390+
14391+
.animate-ping {
14392+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite !important;
14393+
}
14394+
14395+
.animate-pulse {
14396+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
14397+
}
14398+
14399+
.animate-bounce {
14400+
animation: bounce 1s infinite !important;
14401+
}
14402+
1433914403
.example {
1434014404
font-weight: 700;
1434114405
color: #f56565;
@@ -28101,6 +28165,26 @@ video {
2810128165
transition-delay: 1000ms !important;
2810228166
}
2810328167

28168+
.sm\:animate-none {
28169+
animation: none !important;
28170+
}
28171+
28172+
.sm\:animate-spin {
28173+
animation: spin 1s linear infinite !important;
28174+
}
28175+
28176+
.sm\:animate-ping {
28177+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite !important;
28178+
}
28179+
28180+
.sm\:animate-pulse {
28181+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
28182+
}
28183+
28184+
.sm\:animate-bounce {
28185+
animation: bounce 1s infinite !important;
28186+
}
28187+
2810428188
.sm\:example {
2810528189
font-weight: 700;
2810628190
color: #f56565;
@@ -41867,6 +41951,26 @@ video {
4186741951
transition-delay: 1000ms !important;
4186841952
}
4186941953

41954+
.md\:animate-none {
41955+
animation: none !important;
41956+
}
41957+
41958+
.md\:animate-spin {
41959+
animation: spin 1s linear infinite !important;
41960+
}
41961+
41962+
.md\:animate-ping {
41963+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite !important;
41964+
}
41965+
41966+
.md\:animate-pulse {
41967+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
41968+
}
41969+
41970+
.md\:animate-bounce {
41971+
animation: bounce 1s infinite !important;
41972+
}
41973+
4187041974
.md\:example {
4187141975
font-weight: 700;
4187241976
color: #f56565;
@@ -55633,6 +55737,26 @@ video {
5563355737
transition-delay: 1000ms !important;
5563455738
}
5563555739

55740+
.lg\:animate-none {
55741+
animation: none !important;
55742+
}
55743+
55744+
.lg\:animate-spin {
55745+
animation: spin 1s linear infinite !important;
55746+
}
55747+
55748+
.lg\:animate-ping {
55749+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite !important;
55750+
}
55751+
55752+
.lg\:animate-pulse {
55753+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
55754+
}
55755+
55756+
.lg\:animate-bounce {
55757+
animation: bounce 1s infinite !important;
55758+
}
55759+
5563655760
.lg\:example {
5563755761
font-weight: 700;
5563855762
color: #f56565;
@@ -69399,6 +69523,26 @@ video {
6939969523
transition-delay: 1000ms !important;
6940069524
}
6940169525

69526+
.xl\:animate-none {
69527+
animation: none !important;
69528+
}
69529+
69530+
.xl\:animate-spin {
69531+
animation: spin 1s linear infinite !important;
69532+
}
69533+
69534+
.xl\:animate-ping {
69535+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite !important;
69536+
}
69537+
69538+
.xl\:animate-pulse {
69539+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
69540+
}
69541+
69542+
.xl\:animate-bounce {
69543+
animation: bounce 1s infinite !important;
69544+
}
69545+
6940269546
.xl\:example {
6940369547
font-weight: 700;
6940469548
color: #f56565;

0 commit comments

Comments
 (0)