impr: avoid translateY for bad font rendering

This commit is contained in:
Xylight committed 2025-10-06 19:21:17 -07:00
1 parent c73cce8f8a
commit 8068cd6c31
2 files changed
+16 -9

No files matched your search

@@ -1,9 +1,11 @@
<script lang="ts"> <script lang="ts">
import type { Post } from "$lib/api/types" import type { Post } from '$lib/api/types'
import VirtualList from "$lib/app/render/VirtualList.svelte" import VirtualList from '$lib/app/render/VirtualList.svelte'
import { onMount } from "svelte" import { onMount } from 'svelte'
import type { CommentNodeI } from "./comments.svelte" import { expoOut } from 'svelte/easing'
import CommentTree from "./CommentTree.svelte" import { fly } from 'svelte/transition'
import type { CommentNodeI } from './comments.svelte'
import CommentTree from './CommentTree.svelte'
interface Props { interface Props {
nodes: CommentNodeI[] nodes: CommentNodeI[]
@@ -47,10 +49,15 @@
items={nodes} items={nodes}
{initialOffset} {initialOffset}
> >
{#snippet item(index)} {#snippet item(row)}
<div class={['px-3 sm:px-6', index % 2 == 1 && '']}> <div
in:fly={row < 7
? { duration: 800, easing: expoOut, y: 12, delay: row * 50 }
: { opacity: 1, duration: 0 }}
class="px-3 sm:px-6"
>
<CommentTree <CommentTree
bind:nodes={() => [nodes[index]], (v) => (nodes[index] = v[0])} bind:nodes={() => [nodes[row]], (v) => (nodes[row] = v[0])}
{post} {post}
/> />
</div> </div>
+1 -1
View File
@@ -86,7 +86,7 @@
} }
</script> </script>
<ul class="animate-pop-in"> <ul>
{#each nodes as node, index (node.comment_view.comment.id)} {#each nodes as node, index (node.comment_view.comment.id)}
<Comment <Comment
bind:node={nodes[index]} bind:node={nodes[index]}