Default all product images to "cropped" and actual image width (https://github.com/woocommerce/woocommerce-blocks/pull/5551)

* Default imageSizing for the all products block to 'cropped'

* set max-width:100%, width: auto on product grid images
This commit is contained in:
Alex Florisca 2022-01-12 17:50:48 +00:00 committed by GitHub
parent d2ef7143d9
commit a8d979c47b
2 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,8 @@
img { img {
height: auto; height: auto;
width: 100%; width: auto;
max-width: 100%;
&[hidden] { &[hidden] {
display: none; display: none;

View File

@ -2,7 +2,7 @@
* The default layout built from the default template. * The default layout built from the default template.
*/ */
export const DEFAULT_PRODUCT_LIST_LAYOUT = [ export const DEFAULT_PRODUCT_LIST_LAYOUT = [
[ 'woocommerce/product-image' ], [ 'woocommerce/product-image', { imageSizing: 'cropped' } ],
[ 'woocommerce/product-title' ], [ 'woocommerce/product-title' ],
[ 'woocommerce/product-price' ], [ 'woocommerce/product-price' ],
[ 'woocommerce/product-rating' ], [ 'woocommerce/product-rating' ],