diff --git a/index.html b/index.html index 158ccd05..4eaac4c1 100644 --- a/index.html +++ b/index.html @@ -587,7 +587,6 @@

placeholder="Tap to pick a color" id="gradient-background-color1" class="gradient-background-inputs" - required /> @@ -598,7 +597,6 @@

placeholder="Tap to pick a color" id="gradient-background-color2" class="gradient-background-inputs" - required /> @@ -641,7 +639,11 @@

Reset
-
+
Get Result
diff --git a/src/pages/gradient-background.ts b/src/pages/gradient-background.ts index 89259556..2139d7ed 100644 --- a/src/pages/gradient-background.ts +++ b/src/pages/gradient-background.ts @@ -12,9 +12,9 @@ import { getCssOrTailwindDropdown, getTailwindButton, getCssOrTailwindButton, - getInputText, } from '../lib/getElements'; import { + triggerEmptyAnimation, copyCSSCodeToClipboard, showPopup, whatColorButtonShouldShow, @@ -25,7 +25,6 @@ import { getColorsValue, closeDropdown, copyTailwindCodeToClipboard, - triggerEmptyAnimation, } from '../lib/packages/utils'; type Values = { @@ -48,10 +47,12 @@ export function gradientBackgroundGenerator( type: 'newResults' | 'oldResults' | null ) { if (type === null) return; - var element = gradientBackgroundInputs[0]; var value = element.value; // Get the value of the input field if (value.length < 3) { + gradientBackgroundInputs.forEach((ele) => { + triggerEmptyAnimation(ele); + }); return; }