Hello everyone,
I was wondering how to limit the amount of color swatches shown on the category / product listing page?
Right now it looks like this:
Would love to hear any hints or help ![]()
A user sought to limit the number of color swatches displayed on product and category listing pages in the Impulse theme, as too many swatches were appearing.
Initial Response:
Working Solution Found:
The original poster discovered a CSS-based approach:
.grid-product__colors a:nth-of-type(n+4) { display: none; }This CSS rule hides color swatches beyond a specified number (in this case, after the 3rd swatch), providing a clean solution without modifying theme files directly.
Hello everyone,
I was wondering how to limit the amount of color swatches shown on the category / product listing page?
Right now it looks like this:
Would love to hear any hints or help ![]()
Yes you can do it By putting limit in code of product.liquid file for variants in theme files
Found a own way!
.grid-product__colors a:nth-of-type(1n+4) {
display: none;
}
Click “Save” at the top of the page to apply the changes.
That’s it!