Improve inline expansion performance

This commit is contained in:
hayden 2026-06-28 23:31:19 +08:00
parent 9c8a4503ec
commit 6095304716
2 changed files with 7 additions and 1 deletions

View file

@ -119,6 +119,9 @@ rows.forEach(function (row, i) {
next = next.nextElementSibling;
}
row._expandRow = next;
if (row._descRow) {
row.classList.toggle("has-visible-desc", !row._descRow.hidden);
}
});
function collapseAll() {
@ -165,6 +168,7 @@ function applyFilters() {
if (row._descRow.hidden !== descHidden) {
row._descRow.hidden = descHidden;
}
row.classList.toggle("has-visible-desc", !descHidden);
}
if (show) {

View file

@ -790,7 +790,7 @@ kbd {
box-shadow: inset 3px 0 0 var(--accent);
}
.row:has(+ .desc-row:not([hidden])) td {
.row.has-visible-desc td {
border-bottom-color: transparent;
padding-bottom: 0.35rem;
}
@ -1000,7 +1000,9 @@ th[data-sort].sort-asc::after {
text-wrap: pretty;
overflow-wrap: break-word;
word-break: break-word;
content-visibility: auto;
contain: layout style paint;
contain-intrinsic-size: auto 5rem;
animation: expand-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}