Skip to content

Instantly share code, notes, and snippets.

@workeffortwaste
Last active January 22, 2024 15:52
Show Gist options
  • Save workeffortwaste/8297624f11f2649a5323e0e7333928a9 to your computer and use it in GitHub Desktop.
Save workeffortwaste/8297624f11f2649a5323e0e7333928a9 to your computer and use it in GitHub Desktop.
woocommerce-to-css-grid
/* Convert the standard WooCommerce products list into a modern responsive grid. */
ul.products {
--grid-gap: 32px;
--auto-grid-min-size: 200px;
grid-template-columns: repeat(auto-fill, minmax(var(--auto-grid-min-size), 1fr));
grid-gap: var(--grid-gap);
display: grid;
}
ul.products:before{
content:unset!important;
}
ul.products li.product {
width: 100%!important;
display:flex;
flex-direction:column;
}
ul.products li.product a.woocommerce-loop-product__link {
flex-grow: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment