design: improve animation and consistency

This commit is contained in:
James Xylight committed 2025-08-12 15:20:12 -07:00
1 parent e1018828fa
commit 2d641ead1f
12 files changed
+90 -43

No files matched your search

@@ -68,9 +68,9 @@
>
<div
class={[
'relative overflow-hidden rounded-2xl max-h-full',
'p-1 h-full',
'relative overflow-hidden rounded-2xl max-h-full h-full',
'border border-slate-200 dark:border-zinc-800 hover:border-slate-300 dark:hover:border-zinc-700',
'dark:bg-zinc-800 hover-scale-effect',
]}
>
{#if post.thumbnail_url || isImage(post.url)}
@@ -155,3 +155,18 @@
{/if}
</svelte:element>
</div>
<style>
.hover-scale-effect > *,
.hover-scale-effect > picture > img {
transition: transform 200ms var(--ease-cubic);
}
.hover-scale-effect:hover > *,
.hover-scale-effect:hover > picture > img {
transform: scale(95%);
}
.hover-scale-effect:active > *,
.hover-scale-effect:active > picture > img {
transform: scale(90%);
}
</style>