From 5f545eaf8cc80547a474fa6a75fb71d8af293fe4 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Mon, 3 Aug 2020 20:11:15 +0200 Subject: [PATCH 1/2] Remove redundant animation states --- __tests__/fixtures/tailwind-output-ie11.css | 13 ------------- __tests__/fixtures/tailwind-output-important.css | 13 ------------- .../fixtures/tailwind-output-no-color-opacity.css | 13 ------------- __tests__/fixtures/tailwind-output.css | 13 ------------- stubs/defaultConfig.stub.js | 3 --- 5 files changed, 55 deletions(-) diff --git a/__tests__/fixtures/tailwind-output-ie11.css b/__tests__/fixtures/tailwind-output-ie11.css index 6690bfbc7..f4706f772 100644 --- a/__tests__/fixtures/tailwind-output-ie11.css +++ b/__tests__/fixtures/tailwind-output-ie11.css @@ -10951,21 +10951,12 @@ video { } @keyframes spin { - from { - transform: rotate(0deg); - } - to { transform: rotate(360deg); } } @keyframes ping { - 0% { - transform: scale(1); - opacity: 1; - } - 75%, 100% { transform: scale(2); opacity: 0; @@ -10973,10 +10964,6 @@ video { } @keyframes pulse { - 0%, 100% { - opacity: 1; - } - 50% { opacity: .5; } diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css index 96dd0ef58..83c88840f 100644 --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -14373,21 +14373,12 @@ video { } @keyframes spin { - from { - transform: rotate(0deg); - } - to { transform: rotate(360deg); } } @keyframes ping { - 0% { - transform: scale(1); - opacity: 1; - } - 75%, 100% { transform: scale(2); opacity: 0; @@ -14395,10 +14386,6 @@ video { } @keyframes pulse { - 0%, 100% { - opacity: 1; - } - 50% { opacity: .5; } diff --git a/__tests__/fixtures/tailwind-output-no-color-opacity.css b/__tests__/fixtures/tailwind-output-no-color-opacity.css index 0d481f196..9a04c749e 100644 --- a/__tests__/fixtures/tailwind-output-no-color-opacity.css +++ b/__tests__/fixtures/tailwind-output-no-color-opacity.css @@ -11925,21 +11925,12 @@ video { } @keyframes spin { - from { - transform: rotate(0deg); - } - to { transform: rotate(360deg); } } @keyframes ping { - 0% { - transform: scale(1); - opacity: 1; - } - 75%, 100% { transform: scale(2); opacity: 0; @@ -11947,10 +11938,6 @@ video { } @keyframes pulse { - 0%, 100% { - opacity: 1; - } - 50% { opacity: .5; } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index 72d1eb126..f15de0c3f 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -14373,21 +14373,12 @@ video { } @keyframes spin { - from { - transform: rotate(0deg); - } - to { transform: rotate(360deg); } } @keyframes ping { - 0% { - transform: scale(1); - opacity: 1; - } - 75%, 100% { transform: scale(2); opacity: 0; @@ -14395,10 +14386,6 @@ video { } @keyframes pulse { - 0%, 100% { - opacity: 1; - } - 50% { opacity: .5; } diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js index cba3864e5..c55fa4603 100644 --- a/stubs/defaultConfig.stub.js +++ b/stubs/defaultConfig.stub.js @@ -631,15 +631,12 @@ module.exports = { }, keyframes: { spin: { - from: { transform: 'rotate(0deg)' }, to: { transform: 'rotate(360deg)' }, }, ping: { - '0%': { transform: 'scale(1)', opacity: '1' }, '75%, 100%': { transform: 'scale(2)', opacity: '0' }, }, pulse: { - '0%, 100%': { opacity: '1' }, '50%': { opacity: '.5' }, }, bounce: { From c65fbf677769ec64da40dfaae3f1cb038b6cf4ab Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Mon, 3 Aug 2020 20:26:24 +0200 Subject: [PATCH 2/2] Simplify `translateY(0)` to `none` --- __tests__/fixtures/tailwind-output-ie11.css | 2 +- __tests__/fixtures/tailwind-output-important.css | 2 +- __tests__/fixtures/tailwind-output-no-color-opacity.css | 2 +- __tests__/fixtures/tailwind-output.css | 2 +- stubs/defaultConfig.stub.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/__tests__/fixtures/tailwind-output-ie11.css b/__tests__/fixtures/tailwind-output-ie11.css index f4706f772..82f67cf2f 100644 --- a/__tests__/fixtures/tailwind-output-ie11.css +++ b/__tests__/fixtures/tailwind-output-ie11.css @@ -10976,7 +10976,7 @@ video { } 50% { - transform: translateY(0); + transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); } } diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css index 83c88840f..213ed1455 100644 --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -14398,7 +14398,7 @@ video { } 50% { - transform: translateY(0); + transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); } } diff --git a/__tests__/fixtures/tailwind-output-no-color-opacity.css b/__tests__/fixtures/tailwind-output-no-color-opacity.css index 9a04c749e..54767fad5 100644 --- a/__tests__/fixtures/tailwind-output-no-color-opacity.css +++ b/__tests__/fixtures/tailwind-output-no-color-opacity.css @@ -11950,7 +11950,7 @@ video { } 50% { - transform: translateY(0); + transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); } } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index f15de0c3f..2063eca16 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -14398,7 +14398,7 @@ video { } 50% { - transform: translateY(0); + transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); } } diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js index c55fa4603..398b26f85 100644 --- a/stubs/defaultConfig.stub.js +++ b/stubs/defaultConfig.stub.js @@ -645,7 +645,7 @@ module.exports = { animationTimingFunction: 'cubic-bezier(0.8,0,1,1)', }, '50%': { - transform: 'translateY(0)', + transform: 'none', animationTimingFunction: 'cubic-bezier(0,0,0.2,1)', }, },