Marketplace: fix the number of cards in the number of results page

Co-authored-by: andfinally <andfinally@users.noreply.github.com>
This commit is contained in:
raicem 2023-11-22 10:28:29 +03:00 committed by And Finally
parent e3e3870cd7
commit 4e1ea5184e
1 changed files with 10 additions and 5 deletions

View File

@ -21,9 +21,10 @@
grid-template-columns: repeat(2, 1fr);
}
// Hide third and above product cards on Discover and search results page due to API result count
// These are progressively displayed at larger screen sizes.
&__discover .woocommerce-marketplace__product-card:nth-child(n+3) {
// Hide third and above product cards on Discover and suggestions on "no results" search results page
// due to item count. We display progressively more on larger screen sizes.
&__discover .woocommerce-marketplace__product-card:nth-child(n+3),
&__no-results .woocommerce-marketplace__product-card:nth-child(n+3) {
display: none;
}
}
@ -35,7 +36,9 @@
gap: $large-gap;
grid-template-columns: repeat(3, 1fr);
}
&__discover .woocommerce-marketplace__product-card:nth-child(3) {
&__discover .woocommerce-marketplace__product-card:nth-child(3),
&__no-results .woocommerce-marketplace__product-card:nth-child(3) {
display: block;
}
}
@ -46,7 +49,9 @@
&__product-list-content {
grid-template-columns: repeat(4, 1fr);
}
&__discover .woocommerce-marketplace__product-card:nth-child(4) {
&__discover .woocommerce-marketplace__product-card:nth-child(4),
&__no-results .woocommerce-marketplace__product-card:nth-child(4) {
display: block;
}
}