mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
Inspector: Preserve zebra-striping when hiding table rows
Instead of simply setting rows to hidden, add a class so that we can only include visible rows when applying zebra-striping.
This commit is contained in:
parent
a10984ea03
commit
37ca2fc25c
|
|
@ -295,7 +295,11 @@ details > :not(:first-child) {
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.property-table tr:nth-child(even) {
|
||||
.hidden-row {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.property-table tr:nth-child(even of :not(.hidden-row)) {
|
||||
background-color: var(--property-table-row);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,13 @@ inspector.setStyleSheetSource = (identifier, sourceBase64) => {
|
|||
const applyPropertyFilter = (row, searchText) => {
|
||||
const nameMatch = row.cells[0].textContent.toLowerCase().includes(searchText);
|
||||
const valueMatch = row.cells[1].textContent.toLowerCase().includes(searchText);
|
||||
row.style.display = nameMatch || valueMatch ? "" : "none";
|
||||
let matches = nameMatch || valueMatch;
|
||||
|
||||
if (matches) {
|
||||
row.classList.remove("hidden-row");
|
||||
} else {
|
||||
row.classList.add("hidden-row");
|
||||
}
|
||||
};
|
||||
|
||||
const setupPropertyFilter = inputId => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user