mirror of
https://github.com/vinta/awesome-python.git
synced 2026-08-04 15:05:39 +00:00
Improve inline expansion performance
This commit is contained in:
parent
9c8a4503ec
commit
6095304716
2 changed files with 7 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue