Skip to content

Commit 0ca1c14

Browse files
authored
Merge pull request tailwindlabs#2114 from MartijnCuppens/remove-redundant-animation-states
Remove redundant animation states
2 parents 8f88cf5 + c65fbf6 commit 0ca1c14

File tree

5 files changed

+5
-60
lines changed

5 files changed

+5
-60
lines changed

__tests__/fixtures/tailwind-output-ie11.css

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10951,32 +10951,19 @@ video {
1095110951
}
1095210952

1095310953
@keyframes spin {
10954-
from {
10955-
transform: rotate(0deg);
10956-
}
10957-
1095810954
to {
1095910955
transform: rotate(360deg);
1096010956
}
1096110957
}
1096210958

1096310959
@keyframes ping {
10964-
0% {
10965-
transform: scale(1);
10966-
opacity: 1;
10967-
}
10968-
1096910960
75%, 100% {
1097010961
transform: scale(2);
1097110962
opacity: 0;
1097210963
}
1097310964
}
1097410965

1097510966
@keyframes pulse {
10976-
0%, 100% {
10977-
opacity: 1;
10978-
}
10979-
1098010967
50% {
1098110968
opacity: .5;
1098210969
}
@@ -10989,7 +10976,7 @@ video {
1098910976
}
1099010977

1099110978
50% {
10992-
transform: translateY(0);
10979+
transform: none;
1099310980
animation-timing-function: cubic-bezier(0,0,0.2,1);
1099410981
}
1099510982
}

__tests__/fixtures/tailwind-output-important.css

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14563,32 +14563,19 @@ video {
1456314563
}
1456414564

1456514565
@keyframes spin {
14566-
from {
14567-
transform: rotate(0deg);
14568-
}
14569-
1457014566
to {
1457114567
transform: rotate(360deg);
1457214568
}
1457314569
}
1457414570

1457514571
@keyframes ping {
14576-
0% {
14577-
transform: scale(1);
14578-
opacity: 1;
14579-
}
14580-
1458114572
75%, 100% {
1458214573
transform: scale(2);
1458314574
opacity: 0;
1458414575
}
1458514576
}
1458614577

1458714578
@keyframes pulse {
14588-
0%, 100% {
14589-
opacity: 1;
14590-
}
14591-
1459214579
50% {
1459314580
opacity: .5;
1459414581
}
@@ -14601,7 +14588,7 @@ video {
1460114588
}
1460214589

1460314590
50% {
14604-
transform: translateY(0);
14591+
transform: none;
1460514592
animation-timing-function: cubic-bezier(0,0,0.2,1);
1460614593
}
1460714594
}

__tests__/fixtures/tailwind-output-no-color-opacity.css

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12115,32 +12115,19 @@ video {
1211512115
}
1211612116

1211712117
@keyframes spin {
12118-
from {
12119-
transform: rotate(0deg);
12120-
}
12121-
1212212118
to {
1212312119
transform: rotate(360deg);
1212412120
}
1212512121
}
1212612122

1212712123
@keyframes ping {
12128-
0% {
12129-
transform: scale(1);
12130-
opacity: 1;
12131-
}
12132-
1213312124
75%, 100% {
1213412125
transform: scale(2);
1213512126
opacity: 0;
1213612127
}
1213712128
}
1213812129

1213912130
@keyframes pulse {
12140-
0%, 100% {
12141-
opacity: 1;
12142-
}
12143-
1214412131
50% {
1214512132
opacity: .5;
1214612133
}
@@ -12153,7 +12140,7 @@ video {
1215312140
}
1215412141

1215512142
50% {
12156-
transform: translateY(0);
12143+
transform: none;
1215712144
animation-timing-function: cubic-bezier(0,0,0.2,1);
1215812145
}
1215912146
}

__tests__/fixtures/tailwind-output.css

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14563,32 +14563,19 @@ video {
1456314563
}
1456414564

1456514565
@keyframes spin {
14566-
from {
14567-
transform: rotate(0deg);
14568-
}
14569-
1457014566
to {
1457114567
transform: rotate(360deg);
1457214568
}
1457314569
}
1457414570

1457514571
@keyframes ping {
14576-
0% {
14577-
transform: scale(1);
14578-
opacity: 1;
14579-
}
14580-
1458114572
75%, 100% {
1458214573
transform: scale(2);
1458314574
opacity: 0;
1458414575
}
1458514576
}
1458614577

1458714578
@keyframes pulse {
14588-
0%, 100% {
14589-
opacity: 1;
14590-
}
14591-
1459214579
50% {
1459314580
opacity: .5;
1459414581
}
@@ -14601,7 +14588,7 @@ video {
1460114588
}
1460214589

1460314590
50% {
14604-
transform: translateY(0);
14591+
transform: none;
1460514592
animation-timing-function: cubic-bezier(0,0,0.2,1);
1460614593
}
1460714594
}

stubs/defaultConfig.stub.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,15 +631,12 @@ module.exports = {
631631
},
632632
keyframes: {
633633
spin: {
634-
from: { transform: 'rotate(0deg)' },
635634
to: { transform: 'rotate(360deg)' },
636635
},
637636
ping: {
638-
'0%': { transform: 'scale(1)', opacity: '1' },
639637
'75%, 100%': { transform: 'scale(2)', opacity: '0' },
640638
},
641639
pulse: {
642-
'0%, 100%': { opacity: '1' },
643640
'50%': { opacity: '.5' },
644641
},
645642
bounce: {
@@ -648,7 +645,7 @@ module.exports = {
648645
animationTimingFunction: 'cubic-bezier(0.8,0,1,1)',
649646
},
650647
'50%': {
651-
transform: 'translateY(0)',
648+
transform: 'none',
652649
animationTimingFunction: 'cubic-bezier(0,0,0.2,1)',
653650
},
654651
},

0 commit comments

Comments
 (0)