Fix slow first-open of the tag-builder picker

The default 'all' view mounts ~4,200 cards at once; almost all are off-screen.
Add content-visibility:auto so the browser defers layout/paint of off-screen
cards until they scroll into view. Initial open is now noticeably faster;
behaviour is unchanged (cards stay queryable/scrollable/findable).
This commit is contained in:
chrmc40
2026-06-29 08:28:42 -07:00
parent 0b057f1f17
commit 5c57f1411a
2 changed files with 16 additions and 0 deletions
@@ -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;
@@ -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;