diff --git a/js/lib/svelte/assets/promptchain-svelte.css b/js/lib/svelte/assets/promptchain-svelte.css index 49d153a..b85e5b4 100644 --- a/js/lib/svelte/assets/promptchain-svelte.css +++ b/js/lib/svelte/assets/promptchain-svelte.css @@ -5756,6 +5756,14 @@ flex-direction: column; gap: 6px; position: relative; + /* The "all" view mounts thousands of cards but only ~30-50 are ever on + screen. content-visibility defers layout/paint of off-screen cards until + they near the viewport — they stay in the DOM (queryable, scrollable, + find-in-page), so behaviour is unchanged but the initial open is cheap. + The auto intrinsic size remembers each card's real height after first + paint, keeping scroll height stable. */ + content-visibility: auto; + contain-intrinsic-size: auto 150px; } .pcr-atb2-card-mod-dot.svelte-ibd6yj { display: inline-block; diff --git a/svelte-src/components/tag-builder2/TagBuilder2.svelte b/svelte-src/components/tag-builder2/TagBuilder2.svelte index 561c099..b72c442 100644 --- a/svelte-src/components/tag-builder2/TagBuilder2.svelte +++ b/svelte-src/components/tag-builder2/TagBuilder2.svelte @@ -6281,6 +6281,14 @@ flex-direction: column; gap: 6px; position: relative; + /* The "all" view mounts thousands of cards but only ~30-50 are ever on + screen. content-visibility defers layout/paint of off-screen cards until + they near the viewport — they stay in the DOM (queryable, scrollable, + find-in-page), so behaviour is unchanged but the initial open is cheap. + The auto intrinsic size remembers each card's real height after first + paint, keeping scroll height stable. */ + content-visibility: auto; + contain-intrinsic-size: auto 150px; } .pcr-atb2-card-mod-dot { display: inline-block;