mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00: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
Notes:
github-actions[bot]
2025-02-17 11:56:46 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/37ca2fc25ca Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3561 Reviewed-by: https://github.com/gmta ✅
2 changed files with 12 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue