diff --git a/src/components/GlobalStyles.astro b/src/components/GlobalStyles.astro index 232268007..2e3aed0ff 100644 --- a/src/components/GlobalStyles.astro +++ b/src/components/GlobalStyles.astro @@ -216,8 +216,19 @@ color_set({ @apply pointer-events-none text-black/10 dark:text-white/10 } .btn-plain { - @apply transition flex items-center justify-center bg-none hover:bg-[var(--btn-plain-bg-hover)] active:bg-[var(--btn-plain-bg-active)] - text-black/75 hover:text-[var(--primary)] dark:text-white/75 dark:hover:text-[var(--primary)] + @apply transition relative flex items-center justify-center bg-none + overflow-hidden text-black/75 hover:text-[var(--primary)] dark:text-white/75 dark:hover:text-[var(--primary)]; + &:not(.scale-animation) { + @apply hover:bg-[var(--btn-plain-bg-hover)] active:bg-[var(--btn-plain-bg-active)] + } + &.scale-animation { + @apply before:ease-out hover:bg-none relative active:bg-none hover:before:bg-[var(--btn-plain-bg-hover)] active:before:bg-[var(--btn-plain-bg-active)] z-0 + before:absolute before:inset-0 before:transition before:scale-[0.85] hover:before:scale-100 before:-z-10; + + &.current-theme-btn { + @apply before:scale-100 before:opacity-100 before:bg-[var(--btn-plain-bg-hover)] text-[var(--primary)] + } + } } .btn-regular { @apply transition flex items-center justify-center bg-[var(--btn-regular-bg)] hover:bg-[var(--btn-regular-bg-hover)] active:bg-[var(--btn-regular-bg-active)] diff --git a/src/components/LightDarkSwitch.svelte b/src/components/LightDarkSwitch.svelte index abd982437..f2ec34b9e 100644 --- a/src/components/LightDarkSwitch.svelte +++ b/src/components/LightDarkSwitch.svelte @@ -73,7 +73,7 @@ function hidePanel() { diff --git a/src/components/Search.svelte b/src/components/Search.svelte index 1e1863945..c5fe90741 100644 --- a/src/components/Search.svelte +++ b/src/components/Search.svelte @@ -80,7 +80,7 @@ $: search(keywordMobile, false) diff --git a/src/components/widget/WidgetLayout.astro b/src/components/widget/WidgetLayout.astro index 3d8e1a4f1..7f7ac2bf2 100644 --- a/src/components/widget/WidgetLayout.astro +++ b/src/components/widget/WidgetLayout.astro @@ -29,7 +29,7 @@ const className = Astro.props.class {isCollapsed &&
-