diff --git a/src/lib/components/Search.svelte b/src/lib/components/Search.svelte index fbe0626..1a27085 100644 --- a/src/lib/components/Search.svelte +++ b/src/lib/components/Search.svelte @@ -19,7 +19,7 @@ onMount(() => { const searchString = `${recipe.textContent} ${recipe.dataset.tags}`.toLowerCase().normalize('NFD').replace(/\p{Diacritic}/gu, ""); const isMatch = searchTerms.every(term => searchString.includes(term)); - recipe.style.display = (isMatch ? 'block' : 'none'); + recipe.style.display = (isMatch ? 'flex' : 'none'); recipe.classList.toggle("matched-recipe", hasFilter && isMatch); }) } @@ -31,7 +31,7 @@ onMount(() => { clearSearch.addEventListener("click", () => { search.value = ""; recipes.forEach(recipe => { - recipe.style.display = 'block'; + recipe.style.display = 'flex'; recipe.classList.remove("matched-recipe"); }) }) @@ -105,7 +105,7 @@ scale: 0.8 0.8; }