function yit_size_images_style() { $content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870; $margin = 30 / $content_width * 100; // 30px $margin_thumbnails = 8 / $content_width * 100; // 8px $images_container_w = (yit_shop_single_w() + 16) / $content_width * 100; $thumbnails_container_w = $content_width - (yit_shop_single_w() + 16 + 30) - $margin_thumbnails; ?> <style type="text/css"> ul.products li.product.list .product-wrapper { padding-left: <?php echo yit_shop_catalog_w() + 30 + 7 + 2; ?> px; min-height: <?php echo yit_shop_catalog_h() + 7 + 2; ?> px; } ul.products li.product.list .product-wrapper .thumb-wrapper { margin-left: -<?php echo yit_shop_catalog_w() + 30 + 7 + 2; ?> px; width: <?php echo yit_shop_catalog_w() + 10; ?> px; height: <?php echo yit_shop_catalog_h() + 8; ?> px; } ul.products li.product.list .product-wrapper img.onsale { left: <?php echo yit_shop_catalog_w() + 3 - 63; ?> px; } .og-expander.woocommerce div.product div.images div.thumbnails { height: <?php echo yit_shop_thumbnail_h() + 10; ?> px; } .single-product.woocommerce div.product.product-layout-1 div.images { width: <?php echo $images_container_w; ?> %; } .single-product.woocommerce div.product.product-layout-1 div.summary { width: <?php echo 100 - $images_container_w - $margin; ?> %; padding-bottom: <?php echo yit_shop_thumbnail_h(); ?> px; } </style> <?php }
function yit_size_images_style() { $content_width = yit_get_sidebar_layout() == 'sidebar-no' ? 1170 : 870; ?> <style type="text/css"> ul.products li.product.list { padding-left: <?php echo yit_shop_small_w() + 30 + 7 + 2; ?>px } ul.products li.product.list .product-thumbnail { margin-left: -<?php echo yit_shop_small_w() + 30 + 7 + 2; ?>px } .widget.widget_onsale li, .widget.widget_best_sellers li, .widget.widget_recent_reviews li, .widget.widget_recent_products li, .widget.widget_random_products li, .widget.widget_featured_products li, .widget.widget_top_rated_products li, .widget.widget_recently_viewed_products li { min-height: <?php echo yit_shop_thumbnail_h() ?>px } .widget.widget_onsale li .star-rating, .widget.widget_best_sellers li .star-rating, .widget.widget_recent_reviews li .star-rating, .widget.widget_recent_products li .star-rating, .widget.widget_random_products li .star-rating, .widget.widget_featured_products li .star-rating, .widget.widget_top_rated_products li .star-rating, .widget.widget_recently_viewed_products li .star-rating { margin-left: <?php echo yit_shop_thumbnail_w() + 15 ?>px } /* IE8, Portrait tablet to landscape and desktop till 1024px */ .single-product div.images { width: <?php echo ( yit_shop_large_w() - 20 ) / 870 * 100 ?>%; } .single-product div.summary { width: <?php echo 96 - ( ( yit_shop_large_w() + 2 ) / 870 * 100 ) ?>%; } /* WooCommerce standard images */ .single-product .images .thumbnails > a { width: <?php echo min( yit_shop_thumbnail_w(), 80 ) ?>px !important; height: <?php echo min( yit_shop_thumbnail_h(), 80 ) ?>px !important; } /* Slider images */ .single-product .images .thumbnails li img { max-width: <?php echo min( yit_shop_thumbnail_w(), 80 ) ?>px !important; } /* Desktop above 1200px */ @media (min-width:1200px) { <?php $single_product_image = get_option( 'shop_single_image_size' ); $hard_crop_sp_image = $single_product_image['crop']; if( $hard_crop_sp_image ) : ?> .single-product div.images .yith_magnifier_zoom_wrap a img, .single-product div.images > a img { width: <?php echo yit_shop_large_w() ?>px; height: <?php echo yit_shop_large_h() ?>px; } <?php endif; ?> /* WooCommerce standard images */ .single-product .images .thumbnails > a { width: <?php echo min( yit_shop_thumbnail_w(), 100 ) ?>px !important; height: <?php echo min( yit_shop_thumbnail_h(), 100 ) ?>px !important; } /* Slider images */ .single-product .images .thumbnails li img { max-width: <?php echo min( yit_shop_thumbnail_w(), 100 ) ?>px !important; } } /* Desktop above 1200px */ @media (max-width: 979px) and (min-width: 768px) { /* WooCommerce standard images */ .single-product .images .thumbnails > a { width: <?php echo min( yit_shop_thumbnail_w(), 63 ) ?>px !important; height: <?php echo min( yit_shop_thumbnail_h(), 63 ) ?>px !important; } /* Slider images */ .single-product .images .thumbnails li img { max-width: <?php echo min( yit_shop_thumbnail_w(), 63 ) ?>px !important; } } <?php if( yit_get_option( 'responsive-enabled' ) ) : ?> /* Below 767px, mobiles included */ @media (max-width: 767px) { .single-product div.images, .single-product div.summary { float: none; margin-left: 0px !important; width: 100% !important; } .single-product div.images { margin-bottom: 20px; } /* WooCommerce standard images */ .single-product .images .thumbnails > a { width: <?php echo min( yit_shop_thumbnail_w(), 65 ) ?>px !important; height: <?php echo min( yit_shop_thumbnail_h(), 65 ) ?>px !important; } /* Slider images */ .single-product .images .thumbnails li img { max-width: <?php echo min( yit_shop_thumbnail_w(), 65 ) ?>px !important; } } <?php endif ?> </style> <?php }