From bbd22d8c4316569116d4dbad2e136e75f1d9861a Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Mon, 15 Jan 2024 12:41:50 +0000 Subject: [PATCH] Use bulk actions header's checkbox to detect bulk actions in listing styles bulk-action-checkbox is the checkbox in the elements. On page listings, if you're searching and there are no results, the table will still be displayed (to give you the option to search the whole site). The table has no data rows, which means there are no elements with bulk-action-checkbox class. Change the selector to target the bulk-actions-filter-checkbox class instead, which is the bulk action's checkbox. This element (in the header cell) is always available even when there are no results. --- client/scss/components/_listing.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/scss/components/_listing.scss b/client/scss/components/_listing.scss index 2bfdc15bf6..e12b92c71d 100644 --- a/client/scss/components/_listing.scss +++ b/client/scss/components/_listing.scss @@ -91,7 +91,7 @@ ul.listing { } } - &:has(.bulk-action-checkbox) { + &:has(.bulk-actions-filter-checkbox) { td:first-child, th:first-child { // Bulk actions, use smaller width (48px) for smaller screens @@ -609,7 +609,7 @@ table.listing { padding-inline-start: 50px; } - &:has(.bulk-action-checkbox) { + &:has(.bulk-actions-filter-checkbox) { // Bulk actions, match the width of the header spacing up until // the page title (final breadcrumb item): // Breadcrumbs left padding: 20px @@ -632,7 +632,7 @@ table.listing { // If no bulk actions are present, and nice padding is not applied, // apply the same 80px padding via the first column's left padding. - &:not(.nice-padding &, .report &):not(:has(.bulk-action-checkbox)) { + &:not(.nice-padding &, .report &):not(:has(.bulk-actions-filter-checkbox)) { th:first-child, td:first-child { padding-inline-start: theme('spacing.20');