Skip to content

Commit

Permalink
Fix backdrop-blur on hamburger menu not working under webkit
Browse files Browse the repository at this point in the history
  • Loading branch information
holybaechu committed Feb 23, 2024
1 parent 44ffcc3 commit 2a19739
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
7 changes: 1 addition & 6 deletions src/app.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

.backdrop-blur-md-w-webkit {
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
}
@tailwind utilities;
15 changes: 5 additions & 10 deletions src/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let hamburgerMenuOpen = false;
</script>

<header class="fixed w-screen top-0 h-20 backdrop-blur-md-w-webkit outline outline-[#cbd5e11a] outline-1 drop-shadow-lg">
<header class="fixed w-screen top-0 h-20 backdrop-blur-md outline outline-[#cbd5e11a] outline-1 drop-shadow-lg">
<div class="flex h-full items-center px-5 justify-between">
<!-- Logo -->
<a href="/" class="flex items-center h-4/6">
Expand Down Expand Up @@ -36,15 +36,10 @@
</div>

{#if hamburgerMenuOpen}
<div
class="flex backdrop-blur-md-w-webkit mt-[1px] outline-[#cbd5e11a] outline-1 drop-shadow-lg"
transition:slide="{{ duration: 1000, easing: cubicOut }}"
>
<div class="font-semibold m-5 space-y-5 w-full hover:*:text-secondary *:block">
{@html
document.getElementById("nav-links")?.innerHTML
}
</div>
<div class="font-semibold space-y-5 w-full hover:*:text-secondary *:block backdrop-blur-md p-5">
{@html
document.getElementById("nav-links")?.innerHTML
}
</div>
{/if}
</header>

0 comments on commit 2a19739

Please sign in to comment.